- 添加MainService服务类,监听GPS定位更新(1秒间隔,1米距离) - 在AndroidManifest.xml注册MainService服务 - 添加定位权限ACCESS_FINE_LOCATION和ACCESS_COARSE_LOCATION - 使用LogUtils替代android.util.Log进行日志记录 - TAG属性改为public static final
45 lines
1.3 KiB
XML
45 lines
1.3 KiB
XML
<?xml version='1.0' encoding='utf-8'?>
|
|
<manifest
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
package="cc.winboll.studio.gpsrelaysentinel">
|
|
|
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
|
|
|
<application
|
|
android:allowBackup="true"
|
|
android:icon="@mipmap/ic_launcher"
|
|
android:roundIcon="@mipmap/ic_launcher_round"
|
|
android:label="@string/app_name"
|
|
android:theme="@style/MyAppTheme"
|
|
android:resizeableActivity="true"
|
|
android:name=".App">
|
|
|
|
<activity
|
|
android:name=".MainActivity"
|
|
android:label="@string/app_name">
|
|
|
|
<intent-filter>
|
|
|
|
<action android:name="android.intent.action.MAIN"/>
|
|
|
|
<category android:name="android.intent.category.LAUNCHER"/>
|
|
|
|
</intent-filter>
|
|
|
|
</activity>
|
|
|
|
<meta-data
|
|
android:name="android.max_aspect"
|
|
android:value="4.0"/>
|
|
|
|
<activity android:name=".GlobalApplication$CrashActivity"/>
|
|
|
|
<service android:name=".MainService"
|
|
android:enabled="true"
|
|
android:exported="false" />
|
|
|
|
</application>
|
|
|
|
</manifest>
|