blob: 6810c6fa66bc28fd118a42ae21ec9fd9ce6b6f14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package org.codefirex.cfxweather;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
public class BootReceiver extends BroadcastReceiver {
static final String TAG = "WeatherReceiver";
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
Log.i(TAG, "CFX Weather service starting");
context.startService(new Intent(context, WeatherService.class));
}
}
}
|