Motorola E680 Technical Manual - Page 63

Sample of code for calling of 'getDeviceTypeint speedNo' method

Page 63 highlights

15 Phonebook Access API Sample of code for calling of 'getMaxTelNoLength (int device)' method: int maxTelNoLengthPhone = PhoneBookRecord.getMaxTelNoLength(PhoneBookRecord.PHONE_MEMO RY); int maxTelNoLengthSim = PhoneBookRecord.getMaxTelNoLength(PhoneBookRecord.SIM_MEMORY ); int maxTelNoLengthAll = PhoneBookRecord.getMaxTelNoLength(PhoneBookRecord.ALL_MEMORY ); Sample of code for calling of 'getMaxEmailLength ()' method: int maxEmailLength = PhoneBookRecord.getMaxEmailLength(); Sample of code for calling of 'getIndexBySpeedNo(int speedNo)' method: int speedNo = 1; index = PhoneBookRecord.getIndexBySpeedNo(speedNo); Sample of code for calling of 'getNewSpeedNo(int num, int device)' method: int speedNo = 1; int speedNo_phone = PhoneBookRecord.getNewSpeedNo(speedNo, PhoneBookRecord.PHONE_MEMORY); int speedNo_sim = PhoneBookRecord.getNewSpeedNo(speedNo, PhoneBookRecord.PHONE_MEMORY); int speedNo_all = PhoneBookRecord.getNewSpeedNo(speedNo, PhoneBookRecord.PHONE_MEMORY); Sample of code for calling of 'getDeviceType(int speedNo)' method: int speedNo = 1; int type = PhoneBookRecord.getDeviceType(speedNo); Sample of code for calling of 'setPrimary(int index)' method: int index = 1; PhoneBookRecord.setPrimary(index); Sample of code for calling of 'resetPrimary(int index)' method: int index = 1; PhoneBookRecord.resetPrimary(index); Sample of code for calling of 'isPrimary(int speedNo)' method: 63

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107

15
Phonebook Access API
63
Sample of code for calling of ‘getMaxTelNoLength (int device)’ method:
int maxTelNoLengthPhone =
PhoneBookRecord.getMaxTelNoLength(PhoneBookRecord.PHONE_MEMO
RY);
int maxTelNoLengthSim =
PhoneBookRecord.getMaxTelNoLength(PhoneBookRecord.SIM_MEMORY
);
int maxTelNoLengthAll =
PhoneBookRecord.getMaxTelNoLength(PhoneBookRecord.ALL_MEMORY
);
Sample of code for calling of ‘getMaxEmailLength ()’ method:
int maxEmailLength =
PhoneBookRecord.getMaxEmailLength();
Sample of code for calling of ‘getIndexBySpeedNo(int speedNo)’ method:
int speedNo = 1;
index = PhoneBookRecord.getIndexBySpeedNo(speedNo);
Sample of code for calling of ‘getNewSpeedNo(int num, int device)’ method:
int speedNo = 1;
int speedNo_phone =
PhoneBookRecord.getNewSpeedNo(speedNo,
PhoneBookRecord.PHONE_MEMORY);
int speedNo_sim =
PhoneBookRecord.getNewSpeedNo(speedNo,
PhoneBookRecord.PHONE_MEMORY);
int speedNo_all =
PhoneBookRecord.getNewSpeedNo(speedNo,
PhoneBookRecord.PHONE_MEMORY);
Sample of code for calling of ‘getDeviceType(int speedNo)’ method:
int speedNo = 1;
int type = PhoneBookRecord.getDeviceType(speedNo);
Sample of code for calling of ‘setPrimary(int index)’ method:
int index = 1;
PhoneBookRecord.setPrimary(index);
Sample of code for calling of ‘resetPrimary(int index)’ method:
int index = 1;
PhoneBookRecord.resetPrimary(index);
Sample of code for calling of ‘isPrimary(int speedNo)’ method: