Abrufen des einem aktiven Anruf zugewiesen Kontakts
Codebeispiel
public void callIncoming(int callID) // in a phone listener
{
StringBuffer strBuffer = new StringBuffer();
PhoneCall call = Phone.getCall(callID);
BlackBerryContact contact = call.getContact();
if(contact != null)
{
if(contact.countValues(BlackBerryContact.ADDR) > 0)
{
String[] strArray = contact.getStringArray(BlackBerryContact.ADDR, 0);
String city = strArray[BlackBerryContact.ADDR_LOCALITY];
if(city != null && city.length() > 0)
{
strBuffer.append(city);
}
String country = strArray[BlackBerryContact.ADDR_COUNTRY];
if(country != null && country.length() > 0)
{
if(city != null && city.length() > 0)
{
strBuffer.append(", ");
}
strBuffer.append(country);
}
}
}
// use the contact info, for example,
// display it on the incoming phone screen
}
Zugehörige Tasks
Nächstes Thema: Abrufen des einem abgeschlossenen Anruf zugewiesen Kontakts
Vorheriges Thema: Entfernen von Kontaktlisten
Waren diese Informationen hilfreich? Senden Sie uns Ihren Kommentar.