添加运动状态检测,运动实时监听GPS位置,静止时每一分钟监听一次GPS位置。
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="cc.winboll.studio.positions">
|
||||
|
||||
<!-- 1. 声明GPS权限 -->
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
|
||||
<!-- 前台服务权限(可选,提升后台定位稳定性,避免服务被回收) -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
|
||||
@@ -61,6 +64,17 @@
|
||||
<service android:name=".services.AssistantService"/>
|
||||
|
||||
<service android:name=".services.DistanceRefreshService"/>
|
||||
|
||||
|
||||
<!-- 2. 注册运动状态Receiver -->
|
||||
<receiver
|
||||
android:name="cc.winboll.studio.positions.receivers.MotionStatusReceiver"
|
||||
android:enabled="true"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="cc.winboll.studio.positions.ACTION_MOTION_STATUS" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
||||
Reference in New Issue
Block a user