Created
February 13, 2016 00:42
-
-
Save happasuke/13001483bec606e79f40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | |
@Override | |
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