<?xml version='1.0' encoding='utf-8'?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="cc.winboll.studio.positions">

    <!-- 前台服务权限（可选，提升后台定位稳定性，避免服务被回收） -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

    <!-- 只能在前台获取精确的位置信息 -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

    <!-- 只有在前台运行时才能获取大致位置信息 -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

    <!-- 拥有完全的网络访问权限 -->
    <uses-permission android:name="android.permission.INTERNET"/>

    <!-- 在后台使用位置信息 -->
    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>

    <uses-feature
        android:name="android.hardware.location.gps"
        android:required="false"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        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"/>

        <activity android:name="cc.winboll.studio.positions.activities.LocationActivity"/>

        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version"/>

        <service android:name=".services.MainService"/>

        <service android:name=".services.AssistantService"/>

        <service android:name=".services.DistanceRefreshService"/>
    </application>

</manifest>
