Skip to content
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

Implementing all phone contacts Issue #314 fix #590

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ionicc
Copy link

@ionicc ionicc commented Jun 6, 2017

Added a feature to import all contacts in the phone to Olympus app.

Added a feature to import all contacts in the phone to Olympus app
@atsakiridis
Copy link
Collaborator

@ionicc thanks a lot for your contribution! I just forked your clone and tried it locally but I'm getting a crash when I try to import contacts, can you have a look?

Here's the stack trace:

06-07 14:07:21.531 15752-15752/org.restcomm.android.olympus E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.restcomm.android.olympus, PID: 15752
java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{8eb9b9e 15752:org.restcomm.android.olympus/u0a205} (pid=15752, uid=10205) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
	 at android.os.Parcel.readException(Parcel.java:1620)
	 at android.os.Parcel.readException(Parcel.java:1573)
	 at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:4241)
	 at android.app.ActivityThread.acquireProvider(ActivityThread.java:6471)
	 at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2407)
	 at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1521)
	 at android.content.ContentResolver.query(ContentResolver.java:486)
	 at android.content.ContentResolver.query(ContentResolver.java:445)
	 at org.restcomm.android.olympus.AddUserDialogFragment.importContacts(AddUserDialogFragment.java:181)
	 at org.restcomm.android.olympus.AddUserDialogFragment.access$000(AddUserDialogFragment.java:46)
	 at org.restcomm.android.olympus.AddUserDialogFragment$1.onClick(AddUserDialogFragment.java:150)
	 at android.view.View.performClick(View.java:5714)
	 at android.widget.TextView.performClick(TextView.java:10926)
	 at android.view.View$PerformClick.run(View.java:22589)
	 at android.os.Handler.handleCallback(Handler.java:739)
	 at android.os.Handler.dispatchMessage(Handler.java:95)
	 at android.os.Looper.loop(Looper.java:148)
	 at android.app.ActivityThread.main(ActivityThread.java:7303)
	 at java.lang.reflect.Method.invoke(Native Method)
	 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
	 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

@ionicc
Copy link
Author

ionicc commented Jun 7, 2017

That's weird because checkPermissions() method is handling the permissions, Check that out. Permissions should be working perfectly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants