Bob Johnson
Posts: 0
Joined: Mon Mar 03, 2014 9:35 pm

How to access the photo gallery on the device

Hi,

I am trying to use Appery to build an app. One of the functions involves selecting and uploading an existing photo from the device's photo gallery. How can I do this?

Any detailed explanation would be much appreciated. Thanks.

Bob

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How to access the photo gallery on the device

Hello! You can use Camera service with sourcetype = Photolibrary or Saved photo album.

Bob Johnson
Posts: 0
Joined: Mon Mar 03, 2014 9:35 pm

How to access the photo gallery on the device

Thanks. That's very helpful. I'm new to Appery. With that said, how do I pass the taken photo to the next page? Thanks.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How to access the photo gallery on the device

Save it to localStorage and read from localStorage on the second page.

Bob Johnson
Posts: 0
Joined: Mon Mar 03, 2014 9:35 pm

How to access the photo gallery on the device

ok, I mapped it in the data source to a local variable called userphoto. On the next screen, do I read it using an event? If so, what event type and action should I use? Thanks again

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

How to access the photo gallery on the device

Hello Bob,

It depends on your app logic, for more information please look here http://docs.appery.io/documentation/w...

Bob Johnson
Posts: 0
Joined: Mon Mar 03, 2014 9:35 pm

How to access the photo gallery on the device

can you advise how to read it from localStorage on the second page please? thanks.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How to access the photo gallery on the device

Hello! It depends on what are you going to do. You can bind localStorage variable to a component http://docs.appery.io/tutorials/build... and retrieve it's value using JS code http://msdn.microsoft.com/en-us/libra...

Bob Johnson
Posts: 0
Joined: Mon Mar 03, 2014 9:35 pm

How to access the photo gallery on the device

Hi,

The app is taking a photo using the camera on one screen, storing it in a localstorage variable, and then displays it on the following screen. I can get it to display the image from the stored variable on the first page, but can't seem to read it on the following page. What event type needs to be fired on page 2 to get it to read properly?

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

How to access the photo gallery on the device

Hello,

Please try to use page load event. http://docs.appery.io/documentation/w...

Return to “Issues”