@Rob, from what I can see, you are right in that there is no way to ask the user for permission to open Contacts. It must be requested up-front at the apps initial install, unless you know of another way.
You follow the instructions in the blog post and in the sample I showed you. You detect if you’re on Android API 23 or higher and if so, fetch already granted permissions and see if READ_CONTACTS have been granted or not. If not, ask for permission at run time.
Rob
Actually, from what I can tell, on my Android 8, is there is no way to attempt to get READ_CONTACTS at runtime. It must be included in the manifest.xml. So, the solution is include them in the manifest and because it defaults to disabled, give the user instructions on how to enable Contacts after checking if the permissions have not been granted.
Why oh why do you want this? Just don’t do it.
Troy, Google changed their permission system starting with Android 6. They have not made a significant change since. Android 8 certainly reads permissions and allows you request them at runtime.
Are you getting an error?
Can you produce a sample app with what you’re doing and share it here so others can help? I don’t have an Android 8 device.
Rob
@SGS, its an option if the gamer wants to share from their contacts, if they don’t want to share via FB Post.
@Rob, I’ll try and create a sample app. The issue is that if I include the READ_CONTACTS in the build.settings permissions (which Corona uses to create the manifest.xml), it will work. But we may lose some players who don’t want to approve access to Contacts before installing the game. If I don’t include READ_CONTACTS in the permissions, I do get a developer error. So as I said above, we include it in the build.settings permissions and because my Android defaults to the feature as ‘disabled’, the gamer gets a message about how to change it via SETTINGS -> APPS -> MYGAME ->Contacts (on/off toggle)
I want to help you, but I need a starting point.
Rob