I’m trying to make screen shots work with the sdkbox share plugin. If I try to save the path to /mnt/sdcard/screenshot.png it fails on callback. if I give it an absolute path like the one below if works. However will this path always exist? What’s the best way to find an internal app path that will always be writeable ?
I think it is bad idea to user API 25 for example:) you making not native apps - so you will not use latest functionality of it. And older SDK have better compability with older devices. Also regarding permissions it will be headache for you - you have leaderbors/share buttons - but they will not work because user not granted access for them…
You are mixing target sdk with min sdk. The native code is indeed compiled against API 19 (min sdk), but the Java part is against API 25 (target sdk).
I’m writing Android apps (with Java) for my living, so I know how to use runtime permissions. But now I wand to build games with cocos2d-x and I’m confused, how this will be callback to the native part (because it’s an async call).
Maybe I really build a demo “hello world” with runtime permission. This will be a good training for the upcoming weekend
Yeah, I’m already asked SDKBOX to handle this, not sure if they will do it soon or not - as SDKBOX by default now adding in gradle Target SDK 23. I was trying with this permissions runtime but app crashed time to time due it. So it would be good to have working hello world.
I think for Android best is Min sdk 15/16 and Target 22 for now - at least for Cocos - as there is lot of relation to NDK bla bla versions and this setup is more or less stable in terms of crashes.
For native for sure is cool to use latest SDK to get more cool features into app not game:)
Hi @energyy, as promised I build a sample app which ask for a permission and shows the return value within the cocos2d-x world. The main difference between my and the sample you showed me, is that my app doesn’t request the permission at app start and can store the return value for further action.
If I find some time, I will also write a brief blog post about it, so that you don’t have to debug or read all the code to understand it. But right now, it’s a real working sample.