Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
gmedia plugin can not get picture from gallery on Android device — Gideros Forum

gmedia plugin can not get picture from gallery on Android device

XmanXman Member
edited December 2016 in General questions
run on version 6.0.1, permission denied when try to read image from gallery, It may be caused by runtime permission beginning in Android 6.0.
https://developer.android.com/training/permissions/requesting.html

Comments

  • hgy29hgy29 Maintainer
    Yes, probably. Did you target your app to SDK 23 or below ? Android docs says that new permission scheme is only applied if the app is targeted to SDK 23.
  • set targetSdkVersion to 25 or 22 make no difference.
  • XmanXman Member
    edited December 2016
    oh, yes, set target sdk to 22 works.
    set maxSdkVersion to 18 for WRITE_EXTERNAL_STORAGE removed the permission on my device. after remove the maxSdkVersion, it works.
    But it's just a word around for this issue.
  • No, I think that maxSdkVersion is incorrect - on the new export (2016.12 version to be released very soon) it's not there because of this issue.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • hgy29hgy29 Maintainer
    I wouldn't say that setting targetSdk to 22 is a work around, gideros is not yet compatible with SDK 23 permission scheme so it is perfectly normal to tell this fact to android, this is exactly the purpose of targetSdk value: telling android firmware that the app has been tested and is compatible with SDK up to targetSdk. Android will apply compatiblity mechanisms if the app is run on any device with higher version installed.

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    edited December 2016
    @Xman If your compile SDK is say 25, you should still set the target to 22 because 25 can do everything up to 25 (including 22). 22 is the latest sdk than gideros works with though - so don't set it above 22. :)

    The external_storage problem is because if you make a player then files are stored outside of the application storage - so that is you don't have it then you will get a permission error. So don't put in the bit that says the maxsdk version for this permission - as it will mean you have problems reading the files if in player mode.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
Sign In or Register to comment.