mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
CB-10729 Move plugin handlers tests for into platform's repo
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
Copyright 2013 Anis Kadri
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
|
||||
package="com.alunny.childapp" android:versionName="1.1" android:versionCode="5">
|
||||
<supports-screens
|
||||
android:largeScreens="true"
|
||||
android:normalScreens="true"
|
||||
android:smallScreens="true"
|
||||
android:xlargeScreens="true"
|
||||
android:resizeable="true"
|
||||
android:anyDensity="true"
|
||||
/>
|
||||
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_SMS" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.RECORD_VIDEO"/>
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
|
||||
|
||||
<uses-feature android:name="android.hardware.camera" />
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" />
|
||||
|
||||
<application android:icon="@drawable/icon" android:label="@string/app_name"
|
||||
android:debuggable="true">
|
||||
<activity android:name="ChildApp" android:label="@string/app_name"
|
||||
android:configChanges="orientation|keyboardHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="org.test.DroidGap" android:label="@string/app_name"
|
||||
android:configChanges="orientation|keyboardHidden">
|
||||
<intent-filter>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
<uses-sdk android:minSdkVersion="5" />
|
||||
</manifest>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<cordova>
|
||||
<!--
|
||||
access elements control the Android whitelist.
|
||||
Domains are assumed blocked unless set otherwise
|
||||
-->
|
||||
|
||||
<access origin="http://127.0.0.1*"/> <!-- allow local pages -->
|
||||
|
||||
<!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
|
||||
<!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
|
||||
<!-- <access origin=".*"/> Allow all domains, suggested development use only -->
|
||||
|
||||
<log level="DEBUG"/>
|
||||
<preference name="useBrowserHistory" value="false" />
|
||||
<plugins>
|
||||
<plugin name="App" value="org.apache.cordova.App"/>
|
||||
<plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
|
||||
<plugin name="Device" value="org.apache.cordova.Device"/>
|
||||
<plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
|
||||
<plugin name="Compass" value="org.apache.cordova.CompassListener"/>
|
||||
<plugin name="Media" value="org.apache.cordova.AudioHandler"/>
|
||||
<plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
|
||||
<plugin name="org.apache.cordova.core.contacts" value="org.apache.cordova.ContactManager"/>
|
||||
<plugin name="File" value="org.apache.cordova.FileUtils"/>
|
||||
<plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
|
||||
<plugin name="Notification" value="org.apache.cordova.Notification"/>
|
||||
<plugin name="Storage" value="org.apache.cordova.Storage"/>
|
||||
<plugin name="Temperature" value="org.apache.cordova.TempListener"/>
|
||||
<plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
|
||||
<plugin name="Capture" value="org.apache.cordova.Capture"/>
|
||||
<plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
|
||||
<plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
|
||||
</plugins>
|
||||
</cordova>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
./org.test.plugins.dummyplugin/android-resource.xml
|
||||
@@ -0,0 +1 @@
|
||||
extra.gradle
|
||||
@@ -0,0 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:versionCode="1" package="com.test.somelib">
|
||||
<uses-sdk android:minSdkVersion="9"/>
|
||||
<application/>
|
||||
</manifest>
|
||||
@@ -0,0 +1 @@
|
||||
libFile contents
|
||||
@@ -0,0 +1 @@
|
||||
target=android-11
|
||||
@@ -0,0 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:versionCode="1" package="com.test.somelib">
|
||||
<uses-sdk android:minSdkVersion="9"/>
|
||||
<application/>
|
||||
</manifest>
|
||||
@@ -0,0 +1 @@
|
||||
libFile contents
|
||||
@@ -0,0 +1 @@
|
||||
target=android-11
|
||||
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright 2013 Anis Kadri
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
|
||||
<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
id="org.test.plugins.dummyplugin"
|
||||
version="0.6.0">
|
||||
|
||||
<!-- new requirement: NO SPACES -->
|
||||
<name>dummyplugin</name>
|
||||
<!-- These are going to be required by plugman-registry -->
|
||||
<description>my description</description>
|
||||
<author>Jackson Badman</author>
|
||||
<keywords>dummy,plugin</keywords>
|
||||
<license>BSD</license>
|
||||
<!-- end plugman-registry requirements -->
|
||||
|
||||
<asset src="www/dummyplugin.js" target="dummyplugin.js" />
|
||||
<asset src="www/dummyplugin" target="dummyplugin" />
|
||||
|
||||
<config-file target="config.xml" parent="/*">
|
||||
<access origin="build.phonegap.com" />
|
||||
<access origin="s3.amazonaws.com" />
|
||||
</config-file>
|
||||
|
||||
<!-- android -->
|
||||
<platform name="android">
|
||||
<config-file target="AndroidManifest.xml" parent="/manifest/application">
|
||||
<activity android:name="DummyPlugin.org.test.plugins.dummyplugin"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</config-file>
|
||||
|
||||
<framework src="plugin-lib" custom="true" />
|
||||
<framework src="plugin-lib2" custom="true" parent="plugin-lib" />
|
||||
<framework src="extras/android/support/v7/appcompat" />
|
||||
<framework src="extra.gradle" type="gradleReference" />
|
||||
<resource-file src="android-resource.xml" target="res/xml/dummy.xml" />
|
||||
|
||||
<!-- CDV < 2.0 -->
|
||||
<config-file target="res/xml/plugins.xml" parent="/plugins">
|
||||
<plugin name="org.test.plugins.dummyplugin"
|
||||
value="DummyPlugin.org.test.plugins.dummyplugin"/>
|
||||
</config-file>
|
||||
|
||||
<!-- CDV 2.0+ (for now) -->
|
||||
<config-file target="res/xml/config.xml" parent="/cordova/plugins">
|
||||
<plugin name="org.test.plugins.dummyplugin"
|
||||
value="DummyPlugin.org.test.plugins.dummyplugin"/>
|
||||
</config-file>
|
||||
|
||||
<source-file src="src/android/DummyPlugin.java"
|
||||
target-dir="src/com/phonegap/plugins/dummyplugin" />
|
||||
<lib-file src="src/android/TestLib.jar" />
|
||||
</platform>
|
||||
</plugin>
|
||||
@@ -0,0 +1 @@
|
||||
./org.test.plugins.dummyplugin/src/android/DummyPlugin.java
|
||||
@@ -0,0 +1 @@
|
||||
./org.test.plugins.dummyplugin/src/android/TestLib.jar
|
||||
@@ -0,0 +1 @@
|
||||
./org.test.plugins.dummyplugin/www/dummyplugin.js
|
||||
@@ -0,0 +1 @@
|
||||
./org.test.plugins.dummyplugin/www/dummyplugin/image.jpg
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright 2013 Anis Kadri
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
-->
|
||||
|
||||
<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
id="org.test.plugins.faultyplugin"
|
||||
version="0.6.0">
|
||||
|
||||
<name>Faulty Plugin</name>
|
||||
|
||||
<access origin="build.phonegap.com" />
|
||||
<access origin="s3.amazonaws.com" />
|
||||
<!-- file doesn't exist -->
|
||||
|
||||
<config-file target="config.xml" parent="/widget">
|
||||
<asset src="www/main.js" target="faultyplugin/main.js" />
|
||||
<asset src="www/index.js" target="faultyplugin/index.js" />
|
||||
</config-file>
|
||||
|
||||
<!-- android -->
|
||||
<platform name="android">
|
||||
<config-file target="AndroidManifest.xml" parent="/manifest/application">
|
||||
<activity android:name="org.test.plugins.faultyplugin.org.test.plugins.faultyplugin"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</config-file>
|
||||
|
||||
<!-- CDV < 2.0 -->
|
||||
<config-file target="res/xml/plugins.xml" parent="/plugins">
|
||||
<plugin name="org.test.plugins.faultyplugin"
|
||||
value="org.test.plugins.faultyplugin.org.test.plugins.faultyplugin"/>
|
||||
</config-file>
|
||||
|
||||
<!-- CDV 2.0+ (for now) -->
|
||||
<config-file target="res/xml/config.xml" parent="/cordova/plugins">
|
||||
<plugin name="org.test.plugins.faultyplugin"
|
||||
value="org.test.plugins.faultyplugin.org.test.plugins.faultyplugin"/>
|
||||
</config-file>
|
||||
|
||||
<!-- this file doesn't exist -->
|
||||
<source-file src="src/android/NotHere.java"
|
||||
target-dir="src/com/phonegap/plugins/faultyplugin" />
|
||||
</platform>
|
||||
</plugin>
|
||||
@@ -0,0 +1 @@
|
||||
./org.test.plugins.faultyplugin/src/android/org.test.plugins.faultyplugin.java
|
||||
Reference in New Issue
Block a user