package com.openwide.android; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.util.Log; public class MessageReceiver extends BroadcastReceiver{ public static final String MESSAGE_RECEIVED = "com.openwide.android.SMS_RECEIVED"; public static final String ANDROID_MESSAGE_RECEIVED = "android.provider.Telephony.SMS_RECEIVED"; @Override public void onReceive(Context context, Intent intent) { Log.d("------------------", "WORKING :)!!!!"); if (ANDROID_MESSAGE_RECEIVED.equals(intent.getAction())) { Long entryId; Bundle extras = intent.getExtras(); entryId = extras != null ? extras.getLong(MultiSmsSender.PARAM_ENTRY_ID): null; //byte[] pdu = (byte[]) intent.getByteArrayExtra("pdu"); //SmsMessage message = SmsMessage.createFromPdu(pdu); //int status = message.getStatus(); if(entryId != null) { DeliveryDbAdapter mDbHelper = new DeliveryDbAdapter(context); mDbHelper.open(); mDbHelper.setEntryDelivered(entryId); mDbHelper.close(); } } } }