2016-06-13 7 views
0

私はphonegapビルドに次の設定を使用しました。しかし、ビルドした後、android.hardware.location.gpsを要求します。どのようにしてconfigファイルでこの機能を必要としないようにすることができますか?私はそれをamazonと互換性を持たせるために削除する必要があります。助けてください。Phonegap Build Configファイルを削除するにはGPS許可

<content src="index.html"/> 
    <preference name="permissions" value="none"/> 
    <preference name="orientation" value="portrait"/> 
    <preference name="android-windowSoftInputMode" value="stateHidden|adjustPan" /> 
    <preference name="target-device" value="universal"/> 
    <preference name="fullscreen" value="false"/> 
    <preference name="webviewbounce" value="true"/> 
    <preference name="prerendered-icon" value="true"/> 
    <preference name="stay-in-webview" value="false"/> 
    <preference name="ios-statusbarstyle" value="black-opaque"/> 
    <preference name="detect-data-types" value="true"/> 
    <preference name="exit-on-suspend" value="false"/> 
    <preference name="show-splash-screen-spinner" value="true"/> 
    <preference name="auto-hide-splash-screen" value="true"/> 
    <preference name="disable-cursor" value="false"/> 
    <preference name="android-minSdkVersion" value="14"/> 
    <preference name="android-installLocation" value="auto"/> 



    <feature name="permissions" value="none"/> 


    <!-- Core plugins --> 
    <gap:plugin name="org.apache.cordova.battery-status" /> 
    <gap:plugin name="org.apache.cordova.device" /> 
    <gap:plugin name="org.apache.cordova.device-orientation" /> 
    <gap:plugin name="org.apache.cordova.splashscreen"/> 

    <icon src="icon.png"/> 
    <icon src="res/icon/android/icon-36-ldpi.png" gap:platform="android" gap:qualifier="ldpi" /> 
    <icon src="res/icon/android/icon-48-mdpi.png" gap:platform="android" gap:qualifier="mdpi" /> 
    <icon src="res/icon/android/icon-72-hdpi.png" gap:platform="android" gap:qualifier="hdpi" /> 
    <icon src="res/icon/android/icon-96-xhdpi.png" gap:platform="android" gap:qualifier="xhdpi" /> 
    <access origin="*"/> 
    <plugin name="cordova-plugin-whitelist" version="1"/> 
    <allow-intent href="http://*/*"/> 
    <allow-intent href="https://*/*"/> 
    <allow-intent href="tel:*"/> 
    <allow-intent href="sms:*"/> 
    <allow-intent href="mailto:*"/> 
    <platform name="android"> 
    <allow-intent href="market:*"/> 
    </platform> 
    <platform name="ios"> 
    <allow-intent href="itms:*"/> 
    <allow-intent href="itms-apps:*"/> 
    </platform> 
</widget> 
+0

は、あなたのプラグインフォルダとプラットフォームJSONファイルに含まれ、追加のプラグインを持っていけないことを確認してください参照してください。 – Gandhi

答えて

0

私はアマゾンについてよく分かりませんが、あなたはアンドロイドアプリケーションを構築していると仮定します。

2つのオプションがあります。 まず、 platforms/androidにある 'AndroidManifest.xml'を修正してください。 ファイルを開くには、これらは、GPSの権限ある

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 

表示されます。 PhoneGapのネットワーク接続を必要とするため、あなたが

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 

を無効にしないことを確認します 。

第2のオプションは、 'custom-config'というプラグインを使用することです。

cordova-custom-config

関連する問題