Android Tutorial

(avery) #1
Android Tutorial 403

String destination =
numberEntry.getText().toString();
String message =
messageEntry.getText().toString();
sms.sendTextMessage(destination, null, message,
pendingMsgSent, pendingMsgReceipt);
registerReceiver(...);
}
}


After this code is hooked in, the result should look something like
Figure.Within this application, we used the emulator “phone
number” trick (its port number).This is a great way to test sending
SMS messages without using hardware or without incurring charges
by the handset operator.

Two emulators, one sending an SMS from an application and
one receiving an SMS.

A great way to extend this would be to set the sent receiver to
modify a graphic on the screen until the sent notification is
Free download pdf