-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlarmReceiver.java
More file actions
28 lines (24 loc) · 888 Bytes
/
AlarmReceiver.java
File metadata and controls
28 lines (24 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.example.tester;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;
import java.util.logging.Logger;
/**
* Created by toeknee on 13-8-3.
*/
public class AlarmReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction() != null) {
if (intent.getAction().equals(AlarmSysService.ACTION)) {
Intent mIntent = new Intent(context, WeatherUpdateService.class);
mIntent.putExtras(intent.getExtras());
//String cityCode = mIntent.getExtras().getString("cityCode");
//Toast.makeText(context, "AR: " + cityCode, Toast.LENGTH_LONG).show();
context.startService(mIntent);
}
}
}
}