Android 1.6: Contact mit Organization anlegen?

P

pnoom

Neues Mitglied
2
Hallo,

unter Android 1.6 lege ich einen neuen Kontakt an und möchte diesem dann Firmeninformationen (Organization) hinzufügen. Das Anlegen (inklusive mehrerer Telefonnummern und Adressen) funktioniert auch wie gewünscht, aber beim Hinzufügen der Organization bekomme ich eine UnsupportedOperationException (Unknown uri: content://contacts/people/16/organizations). Der relevante Codeteil ist:

Code:
Uri newContact;                              // der neu angelegte Kontakt
String organisation = "Firmenname";

Uri newContactAppended =
            Uri.withAppendedPath(
                newContact,
                android.provider.Contacts.Organizations.CONTENT_DIRECTORY);

ContentValues organisationValues = new ContentValues();
organisationValues.put(
            android.provider.Contacts.Organizations.COMPANY,
            organization);
organisationValues.put(
            android.provider.Contacts.Organizations.ISPRIMARY,
            1);

// XXX: hier wird die Exception geworfen
getContentResolver().insert(
            newContactAppended,
            organisationValues);

Hat jemand eine Idee woran das liegen könnte?
 
Zuletzt bearbeitet:

Ähnliche Themen

D
  • Data2006
Antworten
14
Aufrufe
484
jogimuc
J
B
Antworten
4
Aufrufe
472
bb321
B
FabianDev
Antworten
5
Aufrufe
549
swa00
swa00
Zurück
Oben Unten