New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
安卓 权限检测报错 #323
Comments
please follow https://github.com/rt2zz/react-native-contacts#android-permissions specifically |
@morenoh149 How are Chinese characters sorted? Android getAll() api |
@kmlidc were you able to get this fixed? I have done everything to get tis to work: AndroidManifest.xml:
Per the documentation on permissions with Android M and beyond, found here I am suppose to call the request() function from PermissionsAndroid. So in App.js I have added the following lines:
When I run this code on the Android Studio Emulator I see the alerts, and console messages. How ever when on a real device I get the same stack trace that you are getting. Any help would be appreciated. thanks. |
Actually found this....to fix it... |
@dahudson88 did you follow https://github.com/rt2zz/react-native-contacts#android-1 ? |
Need to request permissions. Study readme. https://github.com/rt2zz/react-native-contacts#android-permissions and https://github.com/rt2zz/react-native-contacts#permissions |
Redmi Note 4X android 7.0
java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{fc6f588 16179:com.hiwoniu.weiling/u0a211} (pid=16179, uid=10211) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
at android.os.Parcel.readException(Parcel.java:1683)
at android.os.Parcel.readException(Parcel.java:1636)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:4256)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:5651)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2281)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1531)
at android.content.ContentResolver.query(ContentResolver.java:516)
at android.content.ContentResolver.query(ContentResolver.java:473)
at com.rt2zz.reactnativecontacts.ContactsProvider.getContacts(ContactsProvider.java:170)
at com.rt2zz.reactnativecontacts.ContactsManager$1.run(ContactsManager.java:88)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:760)
The text was updated successfully, but these errors were encountered: