*/
public static void poll(final Context context, final Address replyTo, final long ms){
final AlarmManager man=(AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
- final Intent pollAlarm=new Intent(context, LocalBroadcastReceiver.class);
- pollAlarm.setAction(LocalBroadcastReceiver.ACTION_POLL_ALARM);
- final PendingIntent intent=PendingIntent.getBroadcast(context, 0, pollAlarm, 0);
+ final Intent pollAlarm=new Intent(context, FonBotMainService.class);
+ pollAlarm.setAction(FonBotMainService.ACTION_TRIGGER_POLL);
+ final PendingIntent intent=PendingIntent.getService(context, 0, pollAlarm, 0);
if(ms==0){
Utils.unregisterOngoing(context, toNonNull(OngoingEvent.POLL));
man.cancel(intent);