X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=src%2Fro%2Fieval%2Ffonbot%2FProtectedBroadcastReceiver.java;h=7ad1537192d3c679526f2824b4124963833d2784;hb=a646935d0f44af999dca8b068aa9568ed5aab988;hp=6cfe3122361418d212e5a01dacde1e5ffb6aa734;hpb=8dfb76c9431dbf8401412cb92c7512e7dc3081a2;p=fonbot.git diff --git a/src/ro/ieval/fonbot/ProtectedBroadcastReceiver.java b/src/ro/ieval/fonbot/ProtectedBroadcastReceiver.java index 6cfe312..7ad1537 100644 --- a/src/ro/ieval/fonbot/ProtectedBroadcastReceiver.java +++ b/src/ro/ieval/fonbot/ProtectedBroadcastReceiver.java @@ -10,6 +10,7 @@ import ro.ieval.fonbot.Utils.MessageType; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; +import android.net.ConnectivityManager; /* * Copyright © 2013 Marius Gavrilescu @@ -51,7 +52,11 @@ public final class ProtectedBroadcastReceiver extends BroadcastReceiver { Utils.sendMessage(context, toNonNull(MessageType.BATTERY), toNonNull(context.getString(battery_okay))); Heavy.describeBatteryLevel(context, null, toNonNull(MessageType.BATTERY)); - } + } else if(action.equals(Intent.ACTION_BOOT_COMPLETED)){ + Utils.sendMessage(context, toNonNull(MessageType.BOOT), + toNonNull(context.getString(device_booted))); + } else if(action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) + context.startService(new Intent(context, FonBotMainService.class)); } }