Hi,
I had tried SMSReceiver. but its not working. its shoing message that java.lang.classNoFoundException.
hw 2 do this.?
please reply me fast.
Thanks,
Dolan.
i had gone through the following:
package com.smsreceiver.android;
import android.content.Context;
import android.content.Intent;
import android.content.IntentReceiver;
import android.os.Bundle;
import android.provider.Telephony;
import android.telephony.gsm.SmsMessage;
import android.util.Log;
import android.widget.Toast;
public class SMSReceiver extends IntentReceiver {
private static final String LOG_TAG = "SMSReceiver";
private static final String ACTION = "android.provider.Telephony.SMS_RECEIVED";
public void onReceiveIntent(Context context, Intent intent) {
if (intent.getAction().equals(ACTION)) {
StringBuilder sb = new StringBuilder();
Bundle bundle = intent.getExtras();
if (bundle != null) {
SmsMessage[] messages =
Telephony.Sms.Intents.getMessagesFromIntent(intent);
for (SmsMessage currentMessage : messages){
sb.append("Received compressed SMS\nFrom: ");
sb.append(currentMessage.getDisplayOriginatingAddress());
sb.append("\n----Message----\n");
sb.append(currentMessage.getDisplayMessageBody());
}
}
Log.i(LOG_TAG, "[SMSApp] onReceiveIntent: " + sb);
Toast.makeText(context, sb.toString(), Toast.LENGTH_LONG).show();
this.abortBroadcast();
Intent i = new Intent(context, SMSActivity.class);
i.setLaunchFlags(Intent.NEW_TASK_LAUNCH);
context.startActivity(i);
}
}
}
plusminus wrote:Hello mjpan,
did you try the Category-Thing

There is no official Bug-Tracking-System yet, but on my Bugs posting them to the GoogleGroups and hoping a moderator would see them was fine ^^.
Regards,
plusminus