Select all the phone numbers from the contacts

1,043 views
Skip to first unread message

ant...@gmail.com

unread,
Jan 13, 2014, 3:05:43 PM1/13/14
to mitappinv...@googlegroups.com
Hi,
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

Taifun

unread,
Jan 13, 2014, 5:12:24 PM1/13/14
to mitappinv...@googlegroups.com, ant...@gmail.com
as far as I know you can't do that with MIT AppInventor
Taifun

Enis

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

Jos Flores

unread,
Jan 13, 2014, 5:29:20 PM1/13/14
to Enis, mitappinventortest, ant...@gmail.com
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...
cheers,
José



On 13 January 2014 17:27, Enis <shadow...@gmail.com> 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 mitappinventort...@googlegroups.com.
> To post to this group, send email to mitappinv...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mitappinventortest/f6f32ff5-b0d5-4b87-8030-c5c5dd36aa46%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Enis

unread,
Jan 13, 2014, 5:54:01 PM1/13/14
to mitappinv...@googlegroups.com, Enis, ant...@gmail.com
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

unread,
Jan 13, 2014, 6:11:35 PM1/13/14
to Jos Flores, Enis, mitappinventortest, ant...@gmail.com
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
* RandomContact.java -- 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??

Cheers, 

-- ralph


ContactCaller.zip

Antonio Crusco

unread,
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 :)
Cheers,
Antonio

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



2014/1/14 Ralph Morelli <ram...@gmail.com>
Reply all
Reply to author
Forward
0 new messages