New in iOS7, users need to grant per-app permissions for microphone access. This is worldwide. In China, users also are prompted to grant per-app permissions for camera access.
How do I (not in China) test this? I want to be able to play with where I request this permission and how my app handles permission denied.
Thanks
Related
I am doing a react native project on expo. When a user have a "never" permission on the phone, when pressing share location button, the app asks if the user wants to change location manually and if "yes" the app redirects to system settings.
However when the user turns back and I try to access location through method getCurrentPositionAsync (expo-location library) and I still see the "LOCATION_FOREGROUND permission is required to do this operation" error, even though the LOCATION_WHEN_IN_USE permission has been granted on the system settings, because my app has not requested the permission through the expo-location API.
Is there a way to achieve this on an expo project, without having to ask twice? (testing on iphone)
I am new to Google API usage, so please excuse the seemingly basic question.
I am writing a mobile app for members of a Club. The app needs to access a Google calendar and photo storage both maintained by the Club admin. I am having difficulty getting my head around the type of app I should be creating (Web Client, IOS, Android or all). When the OAuth consent screen opens, I am not sure which credentials the user should be entering (theirs or the Club admin).
What is required to allow the user to gain access to the shared calendar and photos?
I would like for the user to grant permissions during installation /before the app begins, rather than being prompted while the app is running. Currently, I'm requesting Coarse Location and Microphone access on the Android version of my app and BLE and Microphone access on the IOS version of the app.
That's not possible to do, according to the Android documentations, you can ask for permissions at the installation time only if the android version is less than Marshmallow (i.e. < SDK 23). If the android version is marshmallow or greater then permissions will be asked at the run time, you can't change it.
If the device is running Android 6.0 (API level 23) or higher, and the
app's targetSdkVersion is 23 or higher, the app requests permissions
from the user at run-time. The user can revoke the permissions at any
time, so the app needs to check whether it has the permissions every
time it accesses permission-protected APIs. For more information about
requesting permissions in your app, see the Working with System
Permissions training guide.
If the device is running Android 5.1.1 (API level 22) or lower, or the
app's targetSdkVersion is 22 or lower, the system asks the user to
grant the permissions when the user installs the app. If you add a new
permission to an updated version of the app, the system asks the user
to grant that permission when the user updates the app. Once the user
installs the app, the only way they can revoke the permission is by
uninstalling the app.
https://developer.android.com/guide/topics/permissions/requesting.html
And for iOS too, permissions are asked at the runtime, that's like that since iOS 9. I am not sure about what the flow was before iOS 9.
I have written an application that takes advantage of system_alert_window on android wear. Since marshmallow this permission is revoked by default. I have enabled this permission on the phone side app from the phone settings. But the permission is still denied on the android wear side app and causes the android wear side app to crash with permission denied exception. Is there a way to enable this permission on Android wear side?
Short answer: keep your watch app on targetSdkVersion 22.
Long answer: this permission doesn't use the usual requestPermissions() flow. There's more info in the docs, but it boils down to a special Settings UI for the user to enable this permission - and it doesn't appear that Google has implemented that UI on Wear. Without it, no (non-system) app can be granted this permission, and any app which tries to use it will crash on an error like the following:
android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W#a597673 -- permission denied for this window type
But, this restriction only applies to apps targeting SDK level 23 (and above). So keep your app on 22 for the time being, and hopefully Google will fill this gap before you need to increment it.
UPDATE 22-Dec-2016:
This issue is fixed on Android Wear 2.0. There's still no better solution than the above for Wear 1.x, but Google has implemented the permission UI for Wear 2, and when that's released watch apps should be able to link to it with the standard intent:
startActivity(new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + getPackageName())));
You should dynamically request the permissions from user on wearable devices just the same way you do on the phone side. Checkout the official tutorial Requesting Permissions on Android Wear
I have a rails app that uses omniauth to enable user registration through facebook. My facebook app requests permission from the user to make posts to facebook on the user's behalf. My question is, is there a way for me to determine whether a user "skips" granting that permission during the authentication process (it doesn't seem possible for the user to actually reject the granting of this permission . . . they can only skip it)? I can't see anything in the request.env that is returned by the facebook callback.
Just as an aside, there seems to be all sorts of issues with fb-graph and granting posting permission. For example, even if a user "skips" granting this permission, when the user looks at his fb authorized apps, my app shows up indicating that the user has granted this permission even though fb blocks my app from making fb posts. Also, it seems impossible for a user to subsequently change his mind about allowing my app to post to fb: you can't even edit the application on fb to actually grant the permission.
Am I missing something about fb-graph???
You can check what permissions the user's granted to your app. All you have to do is issue an HTTP GET to /USER_ID/permissions with either a user access_token for this app, or an app access_token. This will return an object containing the permission names which the user has granted the application.