klinker41 / android-chips

Chips in your AutoCompleteTextView on Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exception when trying to show contact chips

samparhizkar opened this issue · comments

I cant get the contact chips to be shown and suggested. If I download the whole sample project completely and run it, that project works. But If I add the chips library to into my own project gradle like instructed in Readme (or just add chips library as a module) it gives this security exception.
My phone is nexus 6 on api 22. And this is logcats Log.

08-25 21:12:38.604 4380-4533/com.sepidsa.fortytwocalendar W/Filter﹕ An exception occured during performFiltering()!
java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{1ce44f5 4380:com.sepidsa.fortytwocalendar/u0a197} (pid=4380, uid=10197) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
at android.os.Parcel.readException(Parcel.java:1546)
at android.os.Parcel.readException(Parcel.java:1499)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3314)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4624)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2472)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1442)
at android.content.ContentResolver.query(ContentResolver.java:462)
at android.content.ContentResolver.query(ContentResolver.java:422)
at com.android.ex.chips.BaseRecipientAdapter.doQuery(BaseRecipientAdapter.java:953)
at com.android.ex.chips.BaseRecipientAdapter.access$100(BaseRecipientAdapter.java:63)
at com.android.ex.chips.BaseRecipientAdapter$DefaultFilter.performFiltering(BaseRecipientAdapter.java:248)
at android.widget.Filter$RequestHandler.handleMessage(Filter.java:234)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)

The exception seems to say it all to me, the app needs permission to your
contacts and it isn't getting that.

On Tue, Aug 25, 2015, 11:53 AM vivotex notifications@github.com wrote:

I cant get the contact chips to be shown and suggested. If I download the
whole sample project completely and run it, that project works. But If I
add the chips library to into my own project gradle like instructed in
Readme (or just add chips library as a module) it gives this security
exception.
My phone is nexus 6 on api 22. And this is logcats Log.

08-25 21:12:38.604 4380-4533/com.sepidsa.fortytwocalendar W/Filter﹕ An
exception occured during performFiltering()!
java.lang.SecurityException: Permission Denial: opening provider
com.android.providers.contacts.ContactsProvider2 from ProcessRecord{1ce44f5
4380:com.sepidsa.fortytwocalendar/u0a197} (pid=4380, uid=10197) requires
android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
at android.os.Parcel.readException(Parcel.java:1546)
at android.os.Parcel.readException(Parcel.java:1499)
at
android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3314)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4624)
at
android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2472)
at
android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1442)
at android.content.ContentResolver.query(ContentResolver.java:462)
at android.content.ContentResolver.query(ContentResolver.java:422)
at
com.android.ex.chips.BaseRecipientAdapter.doQuery(BaseRecipientAdapter.java:953)
at
com.android.ex.chips.BaseRecipientAdapter.access$100(BaseRecipientAdapter.java:63)
at
com.android.ex.chips.BaseRecipientAdapter$DefaultFilter.performFiltering(BaseRecipientAdapter.java:248)
at android.widget.Filter$RequestHandler.handleMessage(Filter.java:234)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)


Reply to this email directly or view it on GitHub
#23.

Right ... I was just gonna report that it's because of the permission. I think it be nice if you add that to Readme file.