How do I get contacts from the phone book of the smartphone?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
How do I get contacts from the phone book of the smartphone?
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
I can not get on with "mobileGetContactData".
Can someone show me a snippet how it works?
Thank you and best regards
Gille
-
- VIP Livecode Opensource Backer
- Posts: 7210
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: How do I get contacts from the phone book of the smartphone?
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
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: How do I get contacts from the phone book of the smartphone?
@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.
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.
Last edited by [-hh] on Wed Feb 21, 2018 1:54 am, edited 3 times in total.
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 7210
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: How do I get contacts from the phone book of the smartphone?
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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: How do I get contacts from the phone book of the smartphone?
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.
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?
Hermann, Hermann...