Adding phonegap plugins
I have a android cordova plugin which provides various functions like connecting to wifi and getting wifi ssid. I am having some issues integrating the plugin into appery, even after reading this link:
http://docs.appery.io/documentation/u...
i.d. of plugin: com.example.wifi
name: WifiService
files: WifiService.java, wifi_service.js, plugin.xml
Steps I took to integrate plugin:
A. Added Android/MyProject/src/com/phonegap/plugins/wifiservice/WifiService.java
B. Added to Android/MyProject/res/xml/config.xml the following:
code
<feature name="WifiService">
<param name="android-package" value="com.example.wifi.WifiService"/>
</feature>
/code
C. Added Android/MyProject/assets/www/files/resources/lib/plugins/com.example.wifi/www/wifi_service.js
D. Added Android/MyProject assets/www/files/resources/lib/plugins/cordova_plugins.js the following:
code
{"file": "plugins\com.example.wifi\www\wifi_service.js",
"id": "com.example.wifi",
"clobbers": ["wifi_service"]}
/code
Questions:
what do I put for "clobbers" in step D?
I need to edit AndroidManifest.xml to add some android permissions, but could not find the file. Do I create a new folder ANDROID/WifiService/AndroidManifest.xml? (I realised that only the Barcode scanner plugin has a extra folder of its own as shown in the picture.)
I also need to edit www/index.html to add code<script language = "javascript" type = "text/javascript" src = "wifi_service.js"></script>/codebut index.html is not found. Do I create a new folder ANDROID/WifiService/assets/html/index.html?
Thanks!