-
Notifications
You must be signed in to change notification settings - Fork 19
Description
I've noticed this project has not been updated in a while. Does anyone know if this is still supported in Unity 2021+?
I have tried downloading the project and running it, but crashes when trying to fetch the contacts list.
Testing on android, logcat prints out missing permissions so I went in and added them to the androidManifest. For example, adding the READ_PHONE_NUMBERS:
And then using a different project to handle calling these permissions at runtime:
async void RequestPermission()
{
AndroidRuntimePermissions.Permission result = await AndroidRuntimePermissions.RequestPermissionAsync( "android.permission.READ_CONTACTS" );
AndroidRuntimePermissions.Permission result2 = await AndroidRuntimePermissions.RequestPermissionAsync( "android.permission.READ_PHONE_NUMBERS" );
if( result == AndroidRuntimePermissions.Permission.Granted &&
result2 == AndroidRuntimePermissions.Permission.Granted)
{
Debug.Log( "We have permission to Read Contacts and phone number" );
// DO STUFF
Contacts.LoadContactList( OnDone, OnLoadFailed );
}
else
{
Debug.Log( "Permission state: " + result + result2 );
}
}
And logcat prints out Permission state: GrantedGranted
But these issues still show up:
TelephonyPermissions: reportAccessDeniedToReadIdentifiers
java.lang.SecurityException: getIccSerialNumber: The uid 10387 does not meet the requirements to access device identifiers.
The last lines to get printed out before the app closes down are:
at com.aliessmael.contactslist.ContactList.LoadInformation_thread(ContactList.java:81)
at com.aliessmael.contactslist.ContactList$1.run(ContactList.java:66)
at java.lang.Thread.run(Thread.java:1012)
It seems the contact list is trying to run but not all (or enough) permissions have been granted.
I do hope we can get this up and running again. Searching several years later for Unity display phone contact list still shows very few results.