]> iEval git - fonbot.git/blobdiff - src/ro/ieval/fonbot/Heavy.java
Fix some messages
[fonbot.git] / src / ro / ieval / fonbot / Heavy.java
index 905b577d34ac187de0bac36072e5f564a84cafdb..3249db8208a37e841c75a35380ac5cd03e5ea066 100644 (file)
@@ -166,6 +166,7 @@ final class Heavy {
                        final Date locationDate=new Date(loc.getTime());
                        sb.append(" ");
                        sb.append(toNonNull(context.getString(at)));
+                       sb.append(" ");
                        sb.append(locationDate.toString());
                        Utils.sendMessage(toNonNull(context), toNonNull(replyTo), toNonNull(sb.toString()));
                }
@@ -1507,7 +1508,7 @@ final class Heavy {
         */
        public static void poll(final Context context, final Address replyTo) {
                Utils.sendMessage(context, replyTo, polling_server);
-               new PollServerAsyncTask(context).execute();
+               Utils.pollServer(context);
        }
 
        /**
@@ -1519,9 +1520,9 @@ final class Heavy {
         */
        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);
This page took 0.028864 seconds and 4 git commands to generate.