13
Phonebook Access
Sample of code for calling of ‘findRecordByName(char firstChar, int sortOrder)’ method:
index = PhoneBookRecord.findRecordByName('N', PhoneBookRecord.SORT_BY_NAME);
Sample of code for calling of ‘findRecordByEmail(String email, int sortOrder)’ method:
String email = “email@mail.com”;
index = phbkRec.findRecordByEmail(email, PhoneBookRecord.SORT_BY_NAME);
Sample of code for calling of ‘getNumberRecords(int device)’ method:
//get total number of records int numberRecsInPhone = PhoneBookRecord.getNumberRecords(PhoneBookRecord.PHONE_MEMORY);
int numberRecsInSim = PhoneBookRecord.getNumberRecords(PhoneBookRecord
.SIM_MEMORY);
int numberRecsAll = PhoneBookRecord.getNumberRecords(PhoneBookRecord.ALL_MEMORY);
Sample of code for calling of ‘getAvailableRecords(int device)’ method:
//get number of available records int numberRecsAvalPhone = PhoneBookRecord.getAvailableRecords(PhoneBookRecord.PHONE_MEMORY); int numberRecsAvalSim =
PhoneBookRecord.getAvailableRecords(PhoneBookRecord.SIM_MEMORY);
int numberRecsAvalAll = PhoneBookRecord.getAvailableRecords(PhoneBookRecord.ALL_MEMORY);
Sample of code for calling of ‘getUsedRecords(int device, int sortOrder)’ method:
//get number of used records int numberRecsUsedPhone =
PhoneBookRecord.getUsedRecords(PhoneBookRecord.PHONE_MEMORY, PhoneBookRecord.SORT_BY_NAME);
int numberRecsUsedSim =
PhoneBookRecord.getUsedRecords(PhoneBookRecord.SIM_MEMORY, PhoneBookRecord.SORT_BY_NAME);
int numberRecsUsedAll =
PhoneBookRecord.getUsedRecords(PhoneBookRecord.ALL_MEMORY, PhoneBookRecord.SORT_BY_NAME);
Sample of code for calling of ‘getNumberRecordsByName(String name)’ method:
int num = PhoneBookRecord.getNumberRecordsByName(name);
Sample of code for calling of ‘getMaxNameLength(int device)’ method:
71