|
|
@@ -21,7 +21,6 @@ import android.os.IBinder;
|
|
|
import android.os.Message;
|
|
|
import android.os.Messenger;
|
|
|
import android.os.RemoteException;
|
|
|
-import android.support.annotation.Nullable;
|
|
|
|
|
|
import com.xzjmyk.pm.activity.R;
|
|
|
import com.xzjmyk.pm.newpedo.bean.StepEntity;
|
|
|
@@ -85,7 +84,6 @@ public class StepService extends Service implements SensorEventListener {
|
|
|
initTodayData();
|
|
|
}
|
|
|
|
|
|
- @Nullable
|
|
|
@Override
|
|
|
public IBinder onBind(Intent intent) {
|
|
|
return messenger.getBinder();
|
|
|
@@ -109,9 +107,9 @@ public class StepService extends Service implements SensorEventListener {
|
|
|
nfIntent = new Intent(this, NewStepActivity.class);
|
|
|
builder.setContentIntent(PendingIntent.getActivity(this, 0, nfIntent, 0)) // 设置PendingIntent
|
|
|
.setLargeIcon(BitmapFactory.decodeResource(this.getResources(), R.drawable.uuu)) // 设置下拉列表中的图标(大图标)
|
|
|
- .setContentTitle("UU运动") // 设置下拉列表里的标题
|
|
|
+ .setContentTitle("UU运动正在后台运行") // 设置下拉列表里的标题
|
|
|
.setSmallIcon(R.drawable.uuu) // 设置状态栏内的小图标
|
|
|
- .setContentText("今日步数:"+CURRENT_STEP+"步"); // 设置上下文内容
|
|
|
+ .setContentText("加油,要记得勤加运动"); // 设置上下文内容
|
|
|
// 获取构建好的Notification
|
|
|
Notification stepNotification = builder.build();
|
|
|
|
|
|
@@ -364,9 +362,9 @@ public class StepService extends Service implements SensorEventListener {
|
|
|
|
|
|
builder.setContentIntent(PendingIntent.getActivity(this, 0, nfIntent, 0)) // 设置PendingIntent
|
|
|
.setLargeIcon(BitmapFactory.decodeResource(this.getResources(), R.drawable.uuu)) // 设置下拉列表中的图标(大图标)
|
|
|
- .setContentTitle("今日步数"+CURRENT_STEP+"步") // 设置下拉列表里的标题
|
|
|
+ .setContentTitle("UU运动正在后台运行") // 设置下拉列表里的标题
|
|
|
.setSmallIcon(R.drawable.uuu) // 设置状态栏内的小图标
|
|
|
- .setContentText("加油,要记得勤加运动"); // 设置上下文内容
|
|
|
+ .setContentText("加油,要记得勤加运动"); // 设置上下文内容
|
|
|
|
|
|
// 获取构建好的Notification
|
|
|
Notification stepNotification = builder.build();
|