Android 1.6: Contact mit Organization anlegen?

  • 0 Antworten
  • Letztes Antwortdatum
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

ThKildau
Antworten
0
Aufrufe
70
ThKildau
ThKildau
asconsulting
Antworten
5
Aufrufe
192
LonelyGremlin
LonelyGremlin
Katharina1985
Antworten
9
Aufrufe
632
Anz
Anz
M
Antworten
21
Aufrufe
1.819
swa00
swa00
Mr-Fisch
Antworten
5
Aufrufe
1.154
migi01
migi01
Zurück
Oben Unten