private static Intent createIntent(Context context) {
return new Intent(context, AlarmReceiver.class);
}
public static PendingIntent createPendingIntent(Context context) {
return PendingIntent.getBroadcast(context, 0, createIntent(context), 0);
}
@Override
public void onReceive(Context context, Intent intent) {
// ͜͜ͰServiceΛىಈ͢ΔͳͲ..
}
} # AndroidManifest.xml
<receiver
android:name=".AlarmReceiver"
android:exported="false" />