googleworkspace / android-samples

Android samples for Google Workspace APIs
Apache License 2.0
636 stars 410 forks source link

Why we need not perform runtime permission request for GET_ACCOUNTS #104

Closed yccheok closed 5 years ago

yccheok commented 5 years ago

Expected Behavior

I can understand why we need GET_ACCOUNTS permission due to https://stackoverflow.com/questions/34639890/google-drive-api-the-name-must-not-be-empty-null-but-i-had-passed-valid-acco

However, when I run the example app, it works, even there's no runtime permission request made. I have tested in Android 5, Android 6 and Android 8.

I'm also further test, by remove GET_ACCOUNTS and MANAGE_ACCOUNTS from Manifest completely. Still, both Android 5, Android 6 and Android 8 are workable. Before running, I have clear cache and clear storage of the app.

device-2018-12-27-052906

Actual Behavior

Expect app to fail due to no permission granted for GET_ACCOUNTS

Steps to Reproduce the Problem

1. 1. 1.

rbstarbuck commented 5 years ago

It's likely that the permission requirements were relaxed when app-level API scoping and monitoring was improved in the API Console, and that the permissions in the sample app are now unnecessary. If your app functions without the permissions, feel free to omit them.