Sir, it works fine but it show in listview only mobile number. I beg your pardon if it wast your time, please send me bolcks which show name and number of contacts in list view.
Here's an example that uses the GetName block to get the contact names and shows them in a list view, that could have been more simpler if the GetName block was returning the result directly instead of calling an event, unfortunately, that's not possible because it needs to ask for permission first..
IOJ9.aia (31.3 KB) ( sorry for the AIA strange name )
Edit: here is an example that expands the ContactNamesAndPhones to two lists:
IOJ9 (4).aia (31.4 KB)
Update: reset the list before getting contacts.
But , Sir Its show only one contact in list view.
Sir your block works fine but it show only one contact (number:name) in list view. pls. reply to help.
Yes, that was happening with an old version of the second aia, can you try the updated aia?
Many thanks for your help.
sir I try the aia but it returns only one contact (number:name) in list view.
I can't solve the problem. I may disturbed you.
Are you sure you used the latest AIA, and used the right group name ? It's working for me:
Can you export the AIA you are testing with here?
Does your extension consider android version? If so from which version it works? Thanks.
My extension should work starting from API 5 ( Android 2 Eclair )
When I run the blocks with MTAI2 companion in my mobile then it shows only one contact (number:name). But when I made apk with the blocks and run after installation by pressing "Get Group Contacts" (of course entered valid group name) then it shows "run time error". I used your AIA file directly by importing aia file in my project. I can't solve the problem. Sorry to take your time again and again. Thanks.
I assume that you are using the old AIA, since you said it gets the phone numbers correctly, I will post here another AIA that should work
I think I identified the reason of this error, I will do a fix shortly.
1- The extension wasn't working in the compiled APK, since the extension wasn't properly declaring the READ_CONTACTS permission in the app's manifest, and therefore, the permission wasn't requested. (Thanks to @Sirajul_Haque )
Strips separators from a phone number string.
Returns a list of all of the phone numbers in the string given.
Called when an error occurs, with the error and its message, instead of showing an undefined runtime error. It's also called when an empty or invalid input is given.
The updated AIX can be found in the first post
Your welcome, here's an AIA to test it:
GetGroupContacts.aia (34.5 KB)
5 posts were merged into an existing topic: Insert contacts into android contacts
I apologize. Still about getting a phone number. please help, how can i get my own phone number using this extension?
@MohamedTamer, Thank you for the help.