Mobile contact access

How do you do that? Please provide a screenshot... first ask for permission in Screen Initialize and after having received the permission, then get the contact list ( I.e. NOT in Screen.Initialize)
Taifun

Here is updated code blocks. Now, I am not getting contact access error... But no data of contact name on display... I waited for 5 min but app is not displaying anything. Is there any thing wrong with code blocks ?? I am expecting only names of my contacts in list view.

What is the purpose of that loop in the GotContactList event?
Does it make sense to add the complete nameList as each item in the new list called name? not really...

What about displaying the nameList and numberList in a label to find out, if you get a result?

Also remove the first row in the PermissionGranted event...

Taifun

I updated the code blocks as per your instructions.... still app is not displaying two sets of list ... for names & for numbers... I am not able to catch the error.

My suggestion was

Taifun

oh sorry... I missed that one.. now updated. Still app is not showing NameLabel & NumberLabel.. There must be some error in my code blocks.

Still I am not able to get contact data - name label & number label from Leo contact ext.

can someone help me ??

I now asked the developer for you

btw. in your latest screenshot unfortunately you still do not assign the results to labels
Unbenannt2

set Label1.Text to nameList
set Label2.Text to numberList

Taifun

1 Like

Just tested in companion Android 13 (real device), works perfectly

image

1 Like

I got the error as following.. and app displays nothing.

Attempt to invoke interface method 'java.lang.String java.lang.CharSequence.toString()' on a null object reference

It looks like I am not able to get access to contact of mobile phonebook. I already used permission block.

image

Don't call the GetContactList block in permission granted event, put it in a button click event (this will only work first time your run the app). Why did you not just copy my blocks?

following is error snap

image

following is code block snap

image

What device are you testing on ?

are you testing in the companion app or after building with the apk file or both?

probably now it is time to reveal the device and Android version you are using for your tests?
did you try another device?

Taifun

1 Like

I am using companion app on android phone with version 10.

What happens on that device if you use the native Contact Picker (in the Social drawer) ?

I used contact picker. It's only taking one contact after manual selection. I need all phone numbers & respective names in separate list to build my business card app.

what about being more specific? which device manufacturer?
Taifun

red mi note 7 pro.