[Resolved] Problems saving/loading photos from album on android

I’m pretty sure the READ_EXTERNAL_STORAGE permission will resolve the issue that @zabace brought up in this forum, because this issue was only happening on an Android 4.4 device he was testing with.  Older versions were fine.  We confirmed this with an Android 4.4 device on our end too.

If you’re still running into a photo selection issue, then odds are it’s because the device has the “Developer Option” named “Do no keep activities” checked on under the device’s main Settings.  That option will exit the last activity displayed when navigating forward to another activity or to the home screen, which is the equivalent to an “applicationExit” in Corona.  So, what you’ll see is that when the end-user finishes making the photo selection, you’ll notice that Corona restarts when returning back from the photo gallery because the Android OS forcibly destroyed the activity and then re-created.  When that happens, we have no means of acquiring the last selected photo from the native code level because our onActivityResult() method in Java (which provides the photo selected by the end-user) never gets called.

What is the status of this fix? This problem hinders the main functionality of our app. 

This issue was solved in a daily build 2-3 months ago.

The newest release version (build #2393) fixes this issue as well.

Thanks! 

We’ve updated to version 2014.2393 and have observed the same behavior. Specifically, this issue is happening on a Samsung Galaxy Note 3 running Android 4.4.2. 

We have also noticed that this issue happens most frequently (nearly every time) when using the highest resolution setting of the phone’s camera. On the lowest setting, it happens infrequently. 

In addition, the phone has 1.4 GB of unused memory and 14 GB of disc space. 

You may be running into some other issue.  For example, if your Android device settings is set up to close an app when you leave them (even when moving forward to another window/activity such as the photo gallery), then what you’ll find is that your app restarts when navigating back from the photo gallery.  This is a developer setting that is not normally displayed to the end-user.  It prevents photo gallery’s Android “intent” which provides the selected photo information from being received.

Would you mind checking if that’s the case on your device?

It would be under the “Developer Settings”.  This would help us confirm what the root cause is.

I’ve checked, and the setting is unchecked. 

@zabace,

send me your apk and I can test here on 2 android devices (Galaxy S3 & S1).

I’ll flag this issue to be re-tested on our end too.

We used to be able to reproduce this issue with our “Media/PhotoPicker” sample app.  We’ll use that for our testing.  Zabace, would you mind testing that sample app on your Galaxy Note 3 too please?  I’m curious if this is the same issue we’ve solved or if you’re actually running into something else.

Everyone,

We were able to reproduce this issue on a Barnes&Noble Galaxy Tab 4, which is an Android 4.4 device.

We were unable to reproduce this issue on Android devices older than 4.4.

So, it looks like the issue found might only happen with 4.4 devices or perhaps just with Samsung’s newest Photo Gallery app.  I’ve noticed that the new photo gallery app pops up while the current app is still being displayed in the background (new behavior; gallery apps typically display fullscreen via an Android activity).  So, I suspect that this new photo app is delivering the selected photo in a different way (ie: different Android intent parameter).  That is, this issue does not appear to be related to the memory leak issue mentioned earlier in this forum thread.

Please note that we’re currently guessing that this is a 4.4 only issue.  More testing is needed on our end, but it’s in the queue.

Thanks for reporting this issue.

good to know.

Thanks for reporting @zabace

I have been reporting this problem during years. Always the same answer. " We were able to reproduce and we need more test."
I have samsung galaxy s3 and happens

Just fyi, this issue is happening when opening the native camera app as well as the gallery. 

zabace,

Is this issue only happening on your Galaxy Note 4?

If it’s happening on your other devices, then can you tell me what their models and OS versions are please?

Thanks in advance.

The only device on which we’ve observed this behavior is a Galaxy Note 3. We’ve tried a Galaxy S3, Galaxy S4, and a Nexus 5, but the problem does not occur on these devices. 

I have been reporting this problem since more than one year ago. I have been ignored. Always with the same answer. It happens. And I have a samsung galaxy s3 and it happens. My users have differents devices and they have reported it too.
But of course. It doesnt exist. And we invented this bug.

Hi,

Can anyone confim this? These rights do not seem to solve the issue with selectPhoto and the Gallery. An Image is not selected. While it does work for Photos.

We have tested with http://developer.samsung.com/remotetestlab/rtlDeviceList.action real devices and free testing via Samsung. I’ll look into this developer setting.

But we are also experiencing bad reviews becuase of this from Samssung Galaxy Note and S5 users amongst others. We have over 10,000 download of our app and about 20+ negative reviews related to this specific issue and memory related problems.

Contact us at martijn@igenapps.com If you can shed any light on this.

Thanks,

Martijn

iGenApps

Just tested the developer setting for closing activities, but it had no effect on a Samsung Galaxy note 3 with 4.4.2.

Can it be that intent filters might help here? Or should we use an Android plugin for Corona Enterprise.

Our app is here by the way. https://play.google.com/store/apps/details?id=com.xpous.myapps 

Martijn

Tried to download on my Galaxy S3 (which is one model that is famous to show that bug) and it is showing here that my device is not compatible. Did you block that model from the available devices?

Yeah seems my collegue has blocked some devices to avoid bad reviews.

We also have some api level defined Android 4.03 or higher. 

I’ll get in touch with him tomorrow.