Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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 final static String TAG = "AlarmReceiver";
public void onReceive(Context context, Intent intent) {
Toast.makeText(context, "Alarm Received", Toast.LENGTH_SHORT).show();
Log.d(TAG, "Alarm Received:" + intent.getIntExtra(Intent.EXTRA_ALARM_COUNT, 0));
context.startService(new Intent(context, TTS.class));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment