Page 1 of 1

How do I get contacts from the phone book of the smartphone?

Posted: Sat Feb 03, 2018 11:39 am
by Gille
I would like to read from a contact from the phone book (Android Phone).
I can not get on with "mobileGetContactData".

Can someone show me a snippet how it works?

Thank you and best regards

Gille

Re: How do I get contacts from the phone book of the smartphone?

Posted: Sat Feb 03, 2018 11:10 pm
by jacque
Try this:

Code: Select all

mobilePickContact -- let user choose a contact
put the result into tID -- LC returns an ID number
put mobileGetContactData(tID) into tData -- store the array in a variable
put tData["firstname"] into msg -- or any other key

Re: How do I get contacts from the phone book of the smartphone?

Posted: Sun Feb 04, 2018 12:08 am
by [-hh]
@Gille.
Trying to read contacts without permission is a violation of privacy.
This forum is not the right place for such ... (cheese).

Edit. Because the OP was offended by the word I used to name such a trial (the german word would have been much harder) I changed it.

Re: How do I get contacts from the phone book of the smartphone?

Posted: Sun Feb 04, 2018 1:47 am
by jacque
It's a normal part of mobile interaction. The user must acknowledge and accept the permission before the app will download, and the script above requires the user to select a contact manually. They can cancel if they don't want to do that.

Re: How do I get contacts from the phone book of the smartphone?

Posted: Sun Feb 04, 2018 11:49 am
by Gille
hi jacque,

vielen Dank für Deine Hilfe / Thank you for your help!

happy weekend!

Gille

@hh - sehr nett was Du von Dir gibst - ich habe nicht vor, Information zu missbrauchen.
Cool wäre es, wenn man Dir ein PN senden könnte.

@hh - very nice what you give from you - I do not intend to abuse information.
Cool it would be if you could send you a PN.

Re: How do I get contacts from the phone book of the smartphone?

Posted: Sun Feb 04, 2018 12:30 pm
by Klaus
Hermann, Hermann... :shock: