Learning Xamarin: Saving and Retrieving Photos

In my previous post, I talked about using the Camera with Forms-Kenmore dishwasherbased applications. In this post I explain how to save and then use the photos you take.  

Saving The Photo

Once we take the photo, the first task is to save it.  I chose to save the photo as a file on disk, with the name of the file created as  #.jpg where # is the ID of the associated item. 

To do this, I want my Xamarin Forms page to talk to a platform specific method (saving is different on each platform).

The easiest way to accomplish this, is to use the DependencyService. Here’s how.  First you create an interface in your core project.  I called mine IPicture and gave it two methods…

Continued here

About Jesse Liberty

Jesse Liberty has three decades of experience writing and delivering software projects and is the author of 2 dozen books and a couple dozen online courses. His latest book, Building APIs with .NET will be released early in 2025. Liberty is a Senior SW Engineer for CNH and he was a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a Microsoft MVP.
This entry was posted in Xamarin. Bookmark the permalink.

2 Responses to Learning Xamarin: Saving and Retrieving Photos

  1. I’m no longer positive the place you’re gettingg your info, but good topic.
    I must spend a while learning more or workingg
    out more. Thanks for fantastic info I was searching for this
    info for my mission.

    Have a look aat my web site; acne no more ebook

  2. b games says:

    Although it’s the best toy that will essentially offer you
    value for your money, always be prepared to cough more when opting for this toy box.

    First, it is important to search for the toys that can be use not only for entertainment purpose but educational too made
    from safe materials. This will fight off boredom
    so you can relax and enjoy those middle days a little more.

Comments are closed.