package com.myprogram.smspost;
import com.myprogram.util.SMSPostUtility;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;
public class AlarmReceiver extends BroadcastReceiver {
private static final String TAG = "SMSPost";
@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
try {
SMSPostUtility smsPostUtility = new SMSPostUtility(context);
String msg = smsPostUtility.postMessage();
Toast.makeText(context, msg, Toast.LENGTH_LONG).show();
} catch (Exception e) {
Log.e(TAG, "ERROR IN CODE:"+e.toString());
}
}
}
|