Android: how to add a contact to the SIM using the SDK?

后端 未结 3 2042
故里飘歌
故里飘歌 2020-12-31 14:30

I am writing an application which writes contacts in the SIM card of an Android phone. I am stuck at the point where the phone number is added: an exception occurs with no a

相关标签:
3条回答
  • 2020-12-31 14:53

    I have replicated this one on my system,but the contact get erased as soon as the mobile restart.This means the contacts are saving in the temporary sim of mobile. Is this same happening on your side or i am missing something. I am using 3G sim.

    Regards

    0 讨论(0)
  • 2020-12-31 15:16
    values.put(RawContacts.ACCOUNT_TYPE, "com.anddroid.contacts.sim");
    

    anddroid? I didn't look at the rest, but might be worth deleting a 'd'

    0 讨论(0)
  • 2020-12-31 15:20

    Data.CONTACT_ID has to be replaced by Data.RAW_CONTACT_ID

    0 讨论(0)
提交回复
热议问题