Is there a way to read outgoing sms from the emulator?
In the logcat I see this message:
D/SmsStorageMonitor( 738): SMS send size=0 time=1327423357467
Is there a way to get the receiver and the content?
The outgoing sms seems not to be saved in the emulator. That means that the messenger app shows me no sms.
Yes just create one service in your app and observe all outgoing sms just refer below code.
public class SMSObserver extends BroadcastReceiver
{
static final String ACTION ="android.provider.Telephony.SMS_SENT";
@Override
public void onReceive(Context context, Intent intent)
{
if (intent.getAction().equals(ACTION))
{
//your action code here
}
}
If you're using your local database to store the outgoing messages while sending from your application, it is possible.
Try to observe the content resolver like following code:
ContentResolver contentResolver = getContentResolver();
contentResolver.registerContentObserver("content://sms", true, yourObserver);