Oct 31, 2011 Replies: 30 Hi, this is my first Android Library. fgContacts Members: GetPhoneNumberByID(String id) As String GetContactPhotoByID(String id) As Bitmap DeleteAllContacts() As Boolean DeleteContactById(String id) As Boolean GetContactsById(String id) As fgContact Returns a single fgContact fgContact Members: Id As String DisplayName As String PhoneNumber As String FamilyName As String GivenName As String Photo As Bitmap Change in version 1.03 Function changed: GetAllContacts(Boolean IncludePhoto, Boolean OnlyContactWhitePhone) As List Returns a List of fgContact objects with all the contacts. GetAllPhoneNumberByID(String id) As List Returns a List of all Phone-Number. The first entry in the List is always the Primary The list looks like this: 01|+49 10001 (01= HOME) 02|+49 10002 (02= MOBILE) 03|+49 10003 (03= WORK) 04|+49 10004 (04= Work Fax) 05|+49 10005 (05= Home Fax) 06|+49 10006 (06= PAGER) 07|+49 10007 (07= Other) 08|+49 10008 (08= Callback) 09|+49 10009 (09= Car) 10|+49 10010 (10= Company Main) 11|+49 10011 (11= ISDN) 12|+49 10012 (12= Main) 13|+49 10013 (13= Other Fax) 14|+49 10014 (14= Radio) 15|+49 10015 (15= Telex) 16|+49 10016 (16= TTY/TDD) 17|+49 10017 (17= Mobile(work)) 18|+49 10018 (18= Pager(work)) 19|+49 10019 (19= Assistant) 20|+49 10020 (20= MMS) New function: GetNoteByID(String id) As List GetPostalAddressByID(String id) As Map GetAllEmailByID(String id) As List Change in version 1.04 New function: GetCompanyByID(String id) As List Ciao, Filippo Attachments fgContacts_v1.04.zip fgContacts_v1.04.zip 7.5 KB · Views: 1,509 fgContact.jpg 55.4 KB · Views: 1,160 fgContact-Example.zip fgContact-Example.zip 14 KB · Views: 1,199 Last edited by a moderator: Aug 28, 2012 Click to expand...
Hi, this is my first Android Library. fgContacts Members: GetPhoneNumberByID(String id) As String GetContactPhotoByID(String id) As Bitmap DeleteAllContacts() As Boolean DeleteContactById(String id) As Boolean GetContactsById(String id) As fgContact Returns a single fgContact fgContact Members: Id As String DisplayName As String PhoneNumber As String FamilyName As String GivenName As String Photo As Bitmap Change in version 1.03 Function changed: GetAllContacts(Boolean IncludePhoto, Boolean OnlyContactWhitePhone) As List Returns a List of fgContact objects with all the contacts. GetAllPhoneNumberByID(String id) As List Returns a List of all Phone-Number. The first entry in the List is always the Primary The list looks like this: 01|+49 10001 (01= HOME) 02|+49 10002 (02= MOBILE) 03|+49 10003 (03= WORK) 04|+49 10004 (04= Work Fax) 05|+49 10005 (05= Home Fax) 06|+49 10006 (06= PAGER) 07|+49 10007 (07= Other) 08|+49 10008 (08= Callback) 09|+49 10009 (09= Car) 10|+49 10010 (10= Company Main) 11|+49 10011 (11= ISDN) 12|+49 10012 (12= Main) 13|+49 10013 (13= Other Fax) 14|+49 10014 (14= Radio) 15|+49 10015 (15= Telex) 16|+49 10016 (16= TTY/TDD) 17|+49 10017 (17= Mobile(work)) 18|+49 10018 (18= Pager(work)) 19|+49 10019 (19= Assistant) 20|+49 10020 (20= MMS) New function: GetNoteByID(String id) As List GetPostalAddressByID(String id) As Map GetAllEmailByID(String id) As List Change in version 1.04 New function: GetCompanyByID(String id) As List Ciao, Filippo
Erel B4X founder Staff member Licensed User Longtime User Nov 1, 2011 #2 Thank you for sharing. Please also update the new libraries list: Libraries - Basic4android Wiki
Amalkotey Active Member Licensed User Longtime User Nov 1, 2011 #3 Moin Filippo, vielen Dank für die fgContacts library. Das erspart mir jetzt Arbeit. Amalkotey
D Deleted member 103 Guest Nov 5, 2011 #4 Hi, update to v1.01. Error in function "GetContactsById" fixed.
peacemaker Expert Licensed User Longtime User Nov 7, 2011 #5 What are minimal requirements to Android to use it ? GetAll returns about 250 contacts also during 12 seconds on a real device, similar to Contacts2 of Erel. Last edited: Nov 8, 2011
What are minimal requirements to Android to use it ? GetAll returns about 250 contacts also during 12 seconds on a real device, similar to Contacts2 of Erel.
peacemaker Expert Licensed User Longtime User Nov 8, 2011 #6 Is there possibility to EDIT the contact ? I mean save changing some field, say Notes.
D Deleted member 103 Guest Nov 8, 2011 #7 Hi peacemaker, What are minimal requirements to Android to use it ? Click to expand... Same as Contacts2. GetAll returns about 250 contacts also during 12 seconds on a real device, similar to Contacts2 of Erel. Click to expand... Unfortunately, my library does not work with even faster. Is there possibility to EDIT the contact ? Click to expand... Perhaps in future. Ciao, Filippo
Hi peacemaker, What are minimal requirements to Android to use it ? Click to expand... Same as Contacts2. GetAll returns about 250 contacts also during 12 seconds on a real device, similar to Contacts2 of Erel. Click to expand... Unfortunately, my library does not work with even faster. Is there possibility to EDIT the contact ? Click to expand... Perhaps in future. Ciao, Filippo
peacemaker Expert Licensed User Longtime User Nov 13, 2011 #8 Filippo, if you are ready to improve your lib - contact update is very needed. I mean update only of SOME fields, saving all others the same especially. I see that UPDATE is CREATE + DELETE ALL OLD ones. DeleteContactById works OK, after contact creation by miscUtil. Last edited: Nov 14, 2011
Filippo, if you are ready to improve your lib - contact update is very needed. I mean update only of SOME fields, saving all others the same especially. I see that UPDATE is CREATE + DELETE ALL OLD ones. DeleteContactById works OK, after contact creation by miscUtil.
peacemaker Expert Licensed User Longtime User Jan 8, 2012 #10 Thanks. Hopefully waiting any updating contact possibility
C cheese Member Licensed User Longtime User Jan 12, 2012 #11 Search for contact using phone number I understand I could do a linear search through all contacts and examine the corresponding phone number. Is there a fast way in B4A to find a contact using a phone number? If not, what would it take to include this functionality? Thanks
Search for contact using phone number I understand I could do a linear search through all contacts and examine the corresponding phone number. Is there a fast way in B4A to find a contact using a phone number? If not, what would it take to include this functionality? Thanks
Erel B4X founder Staff member Licensed User Longtime User Jan 12, 2012 #12 You can store all contacts in a Map with the phone numbers as keys and the contacts as values. If not, what would it take to include this functionality? Click to expand... Cannot answer without investigating this feature.
You can store all contacts in a Map with the phone numbers as keys and the contacts as values. If not, what would it take to include this functionality? Click to expand... Cannot answer without investigating this feature.
C cheese Member Licensed User Longtime User Jan 12, 2012 #13 That would be faster than linear, thanks. Seems a shame to store all that info in memory though. I will give your idea a try and see how it goes. Cheers!
That would be faster than linear, thanks. Seems a shame to store all that info in memory though. I will give your idea a try and see how it goes. Cheers!
peacemaker Expert Licensed User Longtime User Jan 31, 2012 #14 Filippo, sorry again - but any chance to get help for this ?
A ashinkar New Member Licensed User Longtime User Feb 16, 2012 #15 Contact Details (Company Name) Hi, I'm checking to see if there is a way to use these libraries in order to retrieve the contact's company name and Title Thank you Alex
Contact Details (Company Name) Hi, I'm checking to see if there is a way to use these libraries in order to retrieve the contact's company name and Title Thank you Alex
Shay Well-Known Member Licensed User Longtime User Mar 22, 2012 #17 I am getting java.lang.SecurityException: Permission Denial: reading com.android.providers.contacts.ContactsProvider2 uri content://com.android.contacts/data/phones from pid=9787, uid=10123 requires android.permission.READ_CONTACTS this is what i am doing - can you post some code example Sub Globals Dim fg As fgContact Dim fgs As fgContacts Dim list1 As List End Sub Sub Activity_Create(FirstTime As Boolean) list1.Initialize fgs.Initialize list1=fgs.GetAllContacts(False,False)
I am getting java.lang.SecurityException: Permission Denial: reading com.android.providers.contacts.ContactsProvider2 uri content://com.android.contacts/data/phones from pid=9787, uid=10123 requires android.permission.READ_CONTACTS this is what i am doing - can you post some code example Sub Globals Dim fg As fgContact Dim fgs As fgContacts Dim list1 As List End Sub Sub Activity_Create(FirstTime As Boolean) list1.Initialize fgs.Initialize list1=fgs.GetAllContacts(False,False)
Erel B4X founder Staff member Licensed User Longtime User Mar 23, 2012 #18 You can add this permission with the manifest editor.
Shay Well-Known Member Licensed User Longtime User Mar 28, 2012 #19 Got indication from my user that the demo code I sent him, did not manage to get any information I will try to connect my decide to exchange server and try myself
Got indication from my user that the demo code I sent him, did not manage to get any information I will try to connect my decide to exchange server and try myself
Gary Miyakawa Active Member Licensed User Longtime User Jun 11, 2012 #20 Filippo, Is there any way to get to the "Notes" field or the "Internet Call" field ? I'm wanting to use a field for video contact information. Thanks, Gary M
Filippo, Is there any way to get to the "Notes" field or the "Internet Call" field ? I'm wanting to use a field for video contact information. Thanks, Gary M