Select all the phone numbers from the contacts

Skip to first unread message

Jan 13, 2014, 3:05:43 PM1/13/14
I need to find a way to put all phone numbers that are in my phone in a variable of type list.
I was thinking to use the ActivityStarter component, but I don't know how to do it.
Could you help me please.
Thanks in advance,
Looking forward to hearing from you.
Kind regards
Antonio Crusco


Jan 13, 2014, 5:12:24 PM1/13/14
as far as I know you can't do that with MIT AppInventor


Jan 13, 2014, 5:27:50 PM1/13/14
Can't you just cycle through them programatically in a loop, adding each one to a list element?

Jos Flores

Jan 13, 2014, 5:29:20 PM1/13/14
to Enis, mitappinventortest,
as far as I know the phone picker needs 'human intervention'. It's a
picker that needs the user to choose a value. No automation... but I
might be wrong...

On 13 January 2014 17:27, Enis <> wrote:
> Can't you just cycle through them programatically adding each one to a list
> element, then go through the list and create the string?
> --
> You received this message because you are subscribed to the Google Groups
> "MIT App Inventor Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
> To post to this group, send email to
> To view this discussion on the web visit
> For more options, visit


Jan 13, 2014, 5:54:01 PM1/13/14
to, Enis,
Wasn't sure...

OK after looking I don't see any way to automate it either... but I'm a programmer and there's got to be a way lol! ;)

Ralph Morelli

Jan 13, 2014, 6:11:35 PM1/13/14
to Jos Flores, Enis, mitappinventortest,
Hi Jose,

I think you are right. Last July we had a challenge session at the CSTA conference to develop an App Inventor app that picked a random contact from the phone's contact list and call it (where the user could decide to call or not).  But there's no way in App Inventor to just get a list of the phone's contacts.  Instead, the contacts are opened in a Android list view and you then can select one manually.  

So I ended up having to write an Android activity to return a list of the phone's contacts to App Inventor via the ActivityStarted component. App Inventor starts the activity and handles the interaction with the user.  

The attached zip file contains:
* RandomContactCaller.apk -- the whole app package
* RandomContact.apk -- The Android activity that returns a list of contacts
* -- Java source code for the Android activity
* RandomContactCaller.aia -- The App Inventor source code

I thought I had written up a web doc describing this for the conference but I can't find it now??


-- ralph

Antonio Crusco

Jan 14, 2014, 10:42:11 AM1/14/14
to Ralph Morelli, Jos Flores, Enis, mitappinventortest
Thanks you all,
I'll try ralf suggestion as soon as possible,  if I understand something :)

P.s Ralph - In case you find the document, could you send it me please

2014/1/14 Ralph Morelli <>
Reply all
Reply to author
0 new messages