Back to project page AndroidRandomWallpaper.
The source code is released under:
GNU General Public License
If you think the Android project AndroidRandomWallpaper listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.elbauldelprogramador.randomwallpaper.reveivers; /* ww w. j a va2 s . c o m*/ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.util.Log; import com.elbauldelprogramador.randomwallpaper.Service; import com.elbauldelprogramador.randomwallpaper.activities.MainActivity; public class AlarmReceiver extends BroadcastReceiver{ public static String ACTION_CHANGE_WALL_ALARM = "com.elbauldelprogramador.com.randomwallpaper.alarm"; @Override public void onReceive(Context context, Intent intent) { Log.i(MainActivity.TAG, "Alarm intent received"); Bundle bundle = intent.getExtras(); String action = bundle.getString(ACTION_CHANGE_WALL_ALARM); if (action.equals(ACTION_CHANGE_WALL_ALARM)) { Log.d(MainActivity.TAG, "AlarmReceiver: starting service..."); Intent inService = new Intent(context,Service.class); inService.putExtras(bundle); context.startService(inService); } else Log.d(MainActivity.TAG, "AlarmReceiver: no action"); } }