media.selectPhoto problem on Android

I run the sample app SampleCode/Media/PhotoPicker in same Android Galaxy Tab 10. When i tap on screen the app show message “No Image Selected”. The app dont show any screen to select image.

Is the same with PhtoVideo and my app.

Any idea? It’s a bug?

Can you provide all the information about your test device?

Model

Android Version

Carrier

Our sample app was thoroughly tested when we released 2830. If you’re having issues with the sample app then either we’ve introduced a bug since, or its device related.

Thanks

Rob

Model: Sansung Galaxy X

Android Version: 4.0.4

Carrier: Sansung

I built the sample with version 2016.2871. I have tested this sample code in other android devices and the problem is same.

I looked at your sample app and  you do not have:

android.permission.READ_EXTERNAL_STORAGE

in the permission list. You have WRITE_EXTERNAL_STORAGE, but not READ_EXTERNAL_STORAGE

Still, It ran on my test device just fine, albeit you’re drawing the photo centered at 0, 0 rather than in the center of the screen. I also tested our sample app both on Android 4 and 6 and it worked as expected. If you try to pick a photo that’s not a JPEG (.jpg, .jpeg) or PNG (.png) it won’t select anything. It has to be a valid file type.

Rob

Hi Rob, i have change permission to make test, but dont work too.

When i click in button, the app dont show window to select image. But the listener associated with media.selectPhoto is fired and return event wit values:

table: 0x42bb08 {
  [name] => “completion”
   [completed] => false
 }

Has one alternative to solve this problem?

Are you getting any messages in your console log from the device? If you need to know how to see those, please read:

http://docs.coronalabs.com/guide/basics/debugging/index.html

Rob

I build the same sample and run on LG phone with Android 4 and the app works perfect.

The problem is on Sansung devices. I read that Sansung modified android OS in theirs devices.

In older versions of Corona selectPhoto work in same Sansung device. I think that it’s a bug?

Go ahead and file a bug report using the link at the top of the page. You will need a small app that demos the problem. It must have a main.lua, config.lua and build.settings. Put it in a .zip file. When submitting the bug you will upload the .zip file. When filling out the form, make sure you provide the exact specs on the device that it’s failing. Also paste the link for this thread in as a reference.

You will get an email confirming the submission. It will have a CaseID in the subject. Please post that back here as a reference.

Rob

Case 45808.

I am also having a similar issue on some Android devices but not others. media.selectPhoto works the first time. But then it throws an error in logcat:

E/MediaPlayer-JNI(11391): QCMediaPlayer mediaplayer NOT present

After that media.selectPhoto stops working and subsequent calls don’t work.

I have this issue in 2015.2729 as well as the recent 2016.2906 build.

Not sure if it’s the same issue. Just in case I also submitted a bug report: case 46665.

thanks,

Ben