B4A Library fgContacts (Contacts-Library)

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
    7.5 KB · Views: 1,189
  • fgContact.jpg
    fgContact.jpg
    55.4 KB · Views: 738
  • fgContact-Example.zip
    14 KB · Views: 886
Last edited by a moderator:
D

Deleted member 103

Guest
Hi Gary Miyakawa,

Unfortunately I have no idea.


Ciao,
Filippo
 

beniendharto

Member
Licensed User
Longtime User
how to get contact number in the background service

Dear all


right now i want to create application that will get all contact number periodically in background service, but when i use fgcontact libarary in background service, i get the crash result and pop up something error message..so how to solve my problem?..
thank you very much



BR,

Beni Endharto
 
D

Deleted member 103

Guest
Hi beniendharto,

unfortunately, my library not work in a service.
 

Heppy

Active Member
Licensed User
Longtime User
Hello.

This code no return PhoneNumber
I wanted to delete a contact by phone number

B4X:
Sub Button3_click
  Dim Lista As List
  Dim fgC As fgContact
  Dim fgCs As fgContacts
  Lista.Initialize
  fgCs.Initialize
  Lista=fgCs.GetAllContacts(False,False)
  For i=0 To Lista.Size-1
  fgC=Lista.Get(i)
   Log(fgC.Id&"  "&fgC.PhoneNumber&"  "&fgC.DisplayName)
  Next
End Sub

Retun id and DisplayName.
 
Top