X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=src%2Fro%2Fieval%2Ffonbot%2FFonBotMainService.java;h=753425d18081daa9a54c67eb1f2c2ac8248f5612;hb=6b9507db27500572e4366b3f23eefeea079a9d8f;hp=a751d231c434173188b16dcd6a6037273eb83430;hpb=b26f32d6098549c204dba44f353e10fe30a29781;p=fonbot.git diff --git a/src/ro/ieval/fonbot/FonBotMainService.java b/src/ro/ieval/fonbot/FonBotMainService.java index a751d23..753425d 100644 --- a/src/ro/ieval/fonbot/FonBotMainService.java +++ b/src/ro/ieval/fonbot/FonBotMainService.java @@ -70,6 +70,8 @@ public final class FonBotMainService extends Service { * Broadcast action: remove an ongoing event */ public static final String ACTION_DELETE_ONGOING="ro.ieval.fonbot.FonBotMainService.ACTION_DELETE_ONGOING"; + /** Broadcast action: trigger a server poll */ + public static final String ACTION_TRIGGER_POLL="ro.ieval.fonbot.FonBotMainService.ACTION_TRIGGER_POLL"; /** * Extra: ongoing event id * @@ -139,6 +141,9 @@ public final class FonBotMainService extends Service { LocalBroadcastManager.getInstance(this).sendBroadcast(new Intent(ACTION_ONGOING_UPDATE)); } + if(intent!=null && intent.getAction()==ACTION_TRIGGER_POLL) + Utils.pollServer(this); + final boolean runForeground=PreferenceManager.getDefaultSharedPreferences(this).getBoolean("foreground", false); if(!runForeground) stopForeground(true);