AlarmReceiver.java :  » SMS » smspost » com » myprogram » smspost » Android Open Source

Android Open Source » SMS » smspost 
smspost » com » myprogram » smspost » AlarmReceiver.java
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());

        }

  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.