ソスoソスbソスNソスOソスソスソスEソスソスソスhソスナ難ソスソスしソストゑソスソスソスト、ソスソスソスソスソスソスソスIソスソスソスソスソスソス迴滂ソスソスノ終ソスソスソスソスソストゑソスソスソスソスService(ソスニゑソスソスソスソスFソスソス)ソスナゑソスソスB
BroadcastReceiverソス_ソス@ソスナ趣ソスソスヤのゑソスソスソスソス髀茨ソスソスソスソスソスsソスソスソスソスソスソスソスニゑソスソスノ使ソスソスソスニ便暦ソスソスナゑソスソスヒ。
ソスソスソスソスヘ難ソスソスソスソスBroadcastReceiverソスソスソス轤オソスソスソストばゑソスネゑソスソスソスソスソスソスソスソスソスソスソスソス゚、ソスネ会ソスソスフようソスソスIntentServiceソスソスソスソスソスソスソストみまゑソスソスソスソスB
public class HogeReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// ... ソスネゑソス轤ゥソスフ擾ソスソスソス
context.startService(new Intent(context, FugaService.class));
}
public static class FugaService extends IntentService {
public FugaService() {
super("FugaService");
}
@Override
protected void onHandleIntent(Intent intent) {
// ... ソスoソスbソスNソスOソスソスソスEソスソスソスhソスナ行ソスソスソスソスソスソスソスソスソスソス
}
}
}
AndroidManifest.xmlソスヘゑソスソスソスネ奇ソスソスソスソスB
<receiver android:name=".HogeReceiver" />
<service android:name=".HogeReceiver$FugaService" />
ソスソスソスソスソスナゑソスBroadcastReceiverソスソスServiceソスソス2ソスツゑソス1ソスツな奇ソスソスソスソスネので、ソスソスソスソスネ奇ソスソスソスソスナ擾ソスソスソスソスソスソスソスソスソスソスツなゑソスソス閧ェソスかソスソスソスト良ゑソスソスソスソスネ、ソスニ思ソスソスソスソスソスソスソスソスB
IntentServiceソスフクソスソスソスXソスソスソスOソスソスソスノゑソスソストゑソスソスヌゑソスソスソスソスソスソスソスソスソスネゑソスソスB
BroadcastReceiverソスソスソスノ非同奇ソスソスソスソスソスソスソスソスソスソスソスソスソスホゑソスソスソスネ擾ソスソスソスソスソスソスソスソスネゑソスソスト済むのでゑソスソスソスソスヌね。