当我启动应用程序(在设备上)时,会显示一个可扩展列表,当我点击一个孩子时,会在地图上显示 2 个点以及它们之间的道路。打开 WiFi 时应用程序工作正常,但如果我打开 GPS 设备,则显示地图但不显示点。
AndroidManifest.xml 中的代码是:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="aexp.elistcbox"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
- <!-- Network related
-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <!-- Location related
-->
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
- <!-- Wifi related
-->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.Manifest.permission.ACCESS_LOCATION" />
<uses-permission android:name="android.Manifest.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" />
<uses-permission android:name="android.permission.ACCESS_CELL_ID" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<application android:label="@string/app_name">
<uses-library android:name="com.google.android.maps" />
<activity android:name=".ElistCBox"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".GPSLocatorActivity">
</activity>
<activity android:name="aexp.elistcbox.GlobalState"></activity>
</application>
</manifest>