ContactPicker was fine now fails to return

The ContactPicker was fine now fails to return. It now drops out of the app.

Your blocks do not make any sense ?

If you just call back SMS_Contacts without doing anything else in the AfterPicking block does that work ?

Android version ?

Still does the same. So, full sequence is
you pick a contact
it drops out the app but the contacts list still shows in the apps that are open
if you click on it my app restarts

Android version 16. Samsung A53

Working OK here with companion on Google Pixel 8a, Android 16

image

It was working fine. Then this started

Its when I added this from Taifun

Disabled it and works again

This then is a problem of your own making and nothing to do with the Contact Picker.

Can you explain what you were trying to do?
To use the close application block in that event might create an endless loop, because closing triggers the event again

Taifun

I figured I had used it wrong. trying to reopen the app if the phone is restarted. The app is a personal monitoring sytem that requires a periodic response hence always has to be running

You can't force your user to always keep your app running
You might want to look into doing something in the background

Taifun

In addition to what has been said by @TIMAI2 and @Taifun,
you use the mathematical equality block for a boolean (red circled in below snapshot) and for a text (blue circled).


You'd better use the correct equality blocks:
image
for the boolean and
image
for the text.

From the documentation MIT App Inventor Logic Blocks

Acts exactly the same as the = block found in Math

Taifun

Dear @Taifun,
honestly I didn't kow this detail. In effect the logic equality block works independently from the data type.
(Anyway my hint was just referred to a "coding style": I'm an old Fortran, Pascal, C...programmer :grin: in which the data types weren't often compatible each other...)
All the best !

1 Like