phonegap build-Berechtigungen in android
Ich bin mit phonegap build erstellen meiner app.
Gibt es eine Möglichkeit, kann ich die Konfiguration der Berechtigungen gefragt von android?
Für jetzt fragt es für alle Berechtigungen, wenn ich eigentlich nur internet brauchen, "localstorage" und "Benachrichtigungen".
Bitte im Hinterkopf kahl - ich bin nur mithilfe von phonegap build, Nicht-CLI und Cordova nicht.
Ich habe keine AndroidManifest.xml nur config.xml
Kann jemand helfen?
Dank.
Edit:
Diese wurde beantwortet von SvenT23.
Wir beide erkannt, dass phonegap entfernt hat diese Antwort aus Ihrer aktuellen docs und ließ es nur in der alten docs.
Für zukünftige Referenz, die ich hinzufüge, die Anweisungen von phonegap in den Fall wird es gelöscht zu bekommen in der Zukunft.
API-Funktionen
Derzeit unterstützt durch diese Schnittstelle werden die folgenden feature-Namen:
http://api.phonegap.com/1.0/battery
//maps für android:BROADCAST_STICKY Erlaubnishttp://api.phonegap.com/1.0/camera
//maps auf android:KAMERA, winphone:ID_CAP_ISV_CAMERA und winphone:ID_HW_FRONTCAMERA Berechtigungenhttp://api.phonegap.com/1.0/contacts
//maps für android:READ_CONTACTS android:WRITE_CONTACTS, android:GET_ACCOUNTS, und winphone:ID_CAP_CONTACTS Berechtigungenhttp://api.phonegap.com/1.0/file
//Karten zu WRITE_EXTERNAL_STORAGE-Berechtigunghttp://api.phonegap.com/1.0/geolocation
//maps für android:ACCESS_COARSE_LOCATION android:ACCESS_FINE_LOCATION android:ACCESS_LOCATION_EXTRA_COMMANDS und winphone:ID_CAP_LOCATION Berechtigungenhttp://api.phonegap.com/1.0/media
//maps für android:RECORD_AUDIO android:RECORD_VIDEO, android:MODIFY_AUDIO_SETTINGS und winphone:ID_CAP_MICROPHONE Berechtigungenhttp://api.phonegap.com/1.0/network
//maps für android:ACCESS_NETWORK_STATE und winphone:ID_CAP_NETWORKING Berechtigungenhttp://api.phonegap.com/1.0/notification
//Karten an VIBRIEREN Erlaubnishttp://api.phonegap.com/1.0/device
//Karten zu winphone:ID_CAP_IDENTITY_DEVICE Erlaubnis
Beispiel Für Die Verwendung
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.phonegap.example"
versionCode = "10"
version = "1.0.0" >
<!-- versionCode is optional and Android only -->
<name>PhoneGap Example</name>
<description>
An example for phonegap build docs.
</description>
<author href="https://build.phonegap.com" email="[email protected]">
Hardeep Shoker
</author>
<!--
If you do not want any permissions to be added to your app, add the
following tag to your config.xml; you will still have the INTERNET
permission on your app, which PhoneGap requires.
-->
<preference name="permissions" value="none"/>
<!-- to enable individual permissions use the following examples -->
<feature name="http://api.phonegap.com/1.0/battery"/>
<feature name="http://api.phonegap.com/1.0/camera"/>
<feature name="http://api.phonegap.com/1.0/contacts"/>
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/geolocation"/>
<feature name="http://api.phonegap.com/1.0/media"/>
<feature name="http://api.phonegap.com/1.0/network"/>
<feature name="http://api.phonegap.com/1.0/notification"/>
</widget>
InformationsquelleAutor der Frage digicom | 2014-04-30
Du musst angemeldet sein, um einen Kommentar abzugeben.
Eine schnelle etwas googeln gibt die
<feature>
element zum festlegen von Berechtigungen. Kombiniert mit<preference name="permissions" value="none"/>
es sollte genau das sein was du suchst.http://docs.phonegap.com/phonegap-build/configuring/#Features
InformationsquelleAutor der Antwort SvenT23