Solution: Create Contact

netchicken

Active Member
Licensed User
Longtime User
I am in the same boat, I can't create an entry as I am getting the same error

java.lang.RuntimeException: Object should first be initialized (Map).

Are there any other libraries that might do this as well?
 

Stulish

Active Member
Licensed User
Longtime User
Hi all i just tried to implement the library v1.07 and keep getting the following error:


the code is:

B4X:
Dim mu As miscUtil
Dim phones As Map, c As Contact
Dim addrH,addrW,mails As Map
phones.Initialize
mu.Initialize
addrH.Initialize
addrH.Put(0,"")
addrH.Put(1,"")
addrH.Put(2,"")
addrH.Put(3,"")
addrW.Initialize
addrW.Put(0,"")
addrW.Put(1,"")
addrW.Put(2,"")
addrW.Put(3,"")
mails.Initialize
mails.Put(c.EMAIL_HOME,"")
Dim name As String = line.Company
phones.Put(c.PhoneNumber,line.num1)
phones.Put(c.PhoneNumber,line.num2)
phones.Put(c.PhoneNumber,line.num3)
mu.createContactEntry2(name,Null,phones,mails,"","","",addrH,addrW)

What am i doing wrong :'(
 

Attachments

  • error1.png
    108.1 KB · Views: 200

Stulish

Active Member
Licensed User
Longtime User
Ok thanks Erel
 

Stulish

Active Member
Licensed User
Longtime User
I have used the ContactUtils module and its all working great, thanks
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…