Back to project page WarDroid.
The source code is released under:
MIT License
If you think the Android project WarDroid 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.deathsnacks.wardroid.services; //ww w . j av a 2 s . c om import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.util.Log; import com.deathsnacks.wardroid.Constants; /** * Created by Admin on 22/02/14. */ public class NotificationsUpdateReceiver extends BroadcastReceiver { private static final String TAG = "NotificationsUpdateReceiver"; @Override public void onReceive(Context context, Intent intent) { Log.i(TAG, "We are now forcing an update of notifications, because expiry and stuff."); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); if (preferences.getBoolean(Constants.PREF_PUSH, false)) (new GcmBroadcastReceiver()).onReceive(context, intent.putExtra("force", true)); else (new PollingAlarmReceiver()).onReceive(context, intent.putExtra("force", true)); } }