]>
iEval git - fonbot.git/blob - src/ro/ieval/fonbot/LocalBroadcastReceiver.java
1 package ro
.ieval
.fonbot
;
3 import org
.eclipse
.jdt
.annotation
.Nullable
;
5 import android
.content
.BroadcastReceiver
;
6 import android
.content
.Context
;
7 import android
.content
.Intent
;
10 * Copyright © 2013 Marius Gavrilescu
12 * This file is part of FonBot.
14 * FonBot is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
19 * FonBot is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with FonBot. If not, see <http://www.gnu.org/licenses/>.
29 * BroadcastReceiver that receives appwide local broadcasts.
31 * @author Marius Gavrilescu <marius@ieval.ro>
33 public final class LocalBroadcastReceiver
extends BroadcastReceiver
{
35 * Broadcast action: the poll alarm has fired, the app should poll the server
37 public static final String ACTION_POLL_ALARM
="ro.ieval.fonbot.SystemEventReceiver.ACTION_POLL_ALARM";
40 public void onReceive(final @Nullable Context context
, final @Nullable Intent intent
) {
41 if(context
==null || intent
==null)
44 final String action
=intent
.getAction();
45 if(action
.equals(LocalBroadcastReceiver
.ACTION_POLL_ALARM
))
46 Utils
.pollServer(context
);
This page took 0.041902 seconds and 4 git commands to generate.