Mobile contact access

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.

to find out, if it is a device specific issue, try another device (not Xiaomi)
Taifun

ok... if this device specific issue then how can I test my app with real user ? I cannot ask them for device to use the app. Is there any other way get mobile contact data in app inventor ?

Xiaomi devices might have a special setting you have to enable to get that data...
Taifun

now, I am able to get contact access permission. But after clicking button1, I am getting runtime error "Attempt to invoke interface method 'java.lang.String java.lang.CharSequence.toString()' on a null object reference....

What is this error ? How to resolve ?

You already asked the same question 2 months ago... it looks like a device specific issue... you might want to contact the extension developer.

Taifun

Can you pls loop in extension developer ?

It looks like you have forgotten, that I already asked the developer for you, see again here

If the developer is not responding, there is not much we can do...

Taifun