- ページ 4

携帯電話 Motorola A780のPDF 入門マニュアルをオンラインで閲覧またはダウンロードできます。Motorola A780 5 ページ。 J2me
Motorola A780 にも: サービスマニュアル (48 ページ)

Motorola A780 入門マニュアル
is.close();
c.close();
Permissions needed:
1. Writing to a file:
FileConnection sc =
(FileConnection)Connector.open("file:///phone/tmp.txt");
OutputStream os = sc.openOutputStream();
os.write(("text to go into the file").getBytes());
os.flush();
os.close();
Permissions needed:
2. Reading a file:
FileConnection sc =
(FileConnection)Connector.open("file:///phone/tmp.txt");
InputStream is = sc.openInputStream();
StringBuffer sofar = new StringBuffer();
byte c;
while ((c = (byte)is.read()) != -1){
sofar.append((char)c);
}
is.close();
Permissions needed:

3. Sending an SMS:

sender = (MessageConnection)Connector.open("sms://");
TextMessage t =
(TextMessage)sender.newMessage(MessageConnection.TEXT_MESSA
GE);
t.setPayloadText(message);
t.setAddress("sms://" + contactNumber);
sender.send(t);
Permissions needed:
4. Listening for an SMS: blah
Permissions needed:
5. Getting GPS location:
LocationProvider loc = LocationProvider.getInstance(null);
loc.setLocationListener(ll,0,-1,-1);
Location location = loc.getLocation(60*3);
javax.microedition.io.Connector.http
com.motorola.file.writeaccess
com.motorola.file.readaccess
javax.wireless.messaging.sms.send
javax.wireless.messaging.sms.receive