Skip to content
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.

Update plugin.xml - additional uses-permission tags #16

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
77badaa
App->CoreAndroid, BUILD_MULTIPLE_APKS->cdvBuildMultipleApks, set minS…
fujunwei Jan 13, 2015
792ef5f
Update File Picker code to unbreak compile (symbol removed from inter…
agrieve Jan 26, 2015
ddf9297
CB-5059 Add a CookieManager abstraction for Crosswalk.
dpogue Jan 28, 2015
7c17b96
Change ID to org.crosswalk.engine
agrieve Jan 28, 2015
c6ebbbb
setOverScrollMode based on DisallowOverscroll preference (CordovaActi…
agrieve Jan 30, 2015
e772c1c
Set cdvMinSdkVersion and cdvBuildMultipleApks only if project hasn't …
agrieve Jan 30, 2015
2d75fd7
Set crosswalk version to 10+
agrieve Jan 30, 2015
8ce0d96
Add <engine> for gradleReference plugman support
agrieve Jan 30, 2015
17aef35
Tweak required plugman version to be 4.2.0 rather than 4.2.1
agrieve Feb 3, 2015
1d87761
Use Crosswalk-11 for Cordova-android 4.0 release
fujunwei Feb 4, 2015
0943ba5
Add .gitignore (already existed on plugin_with_arm_binary branch)
agrieve Feb 4, 2015
adfe686
Remove unused classes: XWalkCordovaWebViewClient XWalkCordovaChromeCl…
agrieve Feb 6, 2015
a8c2b61
Update to work with cordova-android's refactor of NativeToJsMessageQueue
agrieve Feb 6, 2015
a41a795
Remove system webview-specific work-arounds in shouldInterceptLoadReq…
agrieve Feb 6, 2015
07f4c5e
Allow XWalkPreferences.ANIMATABLE_XWALK_VIEW to be set via a <meta-da…
agrieve Feb 11, 2015
6b72d4b
Refactor to use new CordovaWebViewEngine design
agrieve Feb 6, 2015
7b38aa7
Update to work with cordova-android's commit "Remove `shouldOverrideU…
fujunwei Mar 4, 2015
cdf6400
Make XWalkWebViewEngine.webView final
agrieve Mar 13, 2015
0e18d75
When both allow-navigation and allow-external are set, navigate inste…
agrieve Mar 13, 2015
49baf50
Update README.md
huningxin Mar 23, 2015
9b0c8f1
Add note about `--android-minSdkVersion` in README.md
agrieve Mar 25, 2015
7ece298
Change name to "cordova-plugin-crosswalk-webview"
agrieve Mar 25, 2015
22fef8b
Add a package.json
agrieve Mar 25, 2015
8cf6eba
Add -dev suffix to plugin version
agrieve Mar 25, 2015
d41b857
Delete some commented out code
agrieve Apr 8, 2015
4788b00
Update instructions for CLI
mmocny Apr 9, 2015
92d589f
Updating the name of the plugin in readme
mmocny Apr 14, 2015
92c5701
Update plugin.xml - additional uses-permission tags
EdHubbell May 9, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/libs/xwalk_core_library/build/
/libs/xwalk_core_library/build.gradle
*.iml

30 changes: 30 additions & 0 deletions PlatformScriptsWorkflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
### Directions for Non-CLI Android-Only cordova project

* Pull down the Cordova Android
```
$ git clone https://github.com/apache/cordova-android.git
```
* Generate a project, e.g creating HelloWorld
```
$ /path/to/cordova-android/bin/create hello com.example.hello HelloWorld
```
* Navigate to the project folder
```
$ cd hello
```
* Install Crosswalk engine plugin by plugman (version >= 0.22.17)
```
$ plugman install --platform android --plugin https://github.com/MobileChromeApps/cordova-crosswalk-engine.git --project .
```
* Build
```
$ ./cordova/build
```
The build script will automatically fetch the Crosswalk WebView libraries from Crosswalk project download site (https://download.01.org/crosswalk/releases/crosswalk/android/) and build for both X86 and ARM architectures.

For example, building HelloWorld generates:

```
/path/to/hello/build/outputs/apk/hello-x86-debug.apk
/path/to/hello/build/outputs/apk/hello-armv7-debug.apk
```
51 changes: 27 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
Apache Cordova Crosswalk Engine
===

Cordova Crosswalk Engine is a [Crosswalk WebView](https://crosswalk-project.org/) based engine to work with [Apache Cordova](http://cordova.apache.org/) for Android. This requires [Cordova Android](https://github.com/apache/cordova-android) 4.0.0+.

Apache Cordova Crosswalk Engine Proof-of-Concept
===
### Install

The following directions are for cordova-cli (most people). Alternatively you can use the [Android platform scripts workflow](PlatformScriptsWorkflow.md).

* Open an existing cordova project, with cordova-android 4.0.0+, and using the latest CLI.
* Add this plugin

Cordova Crosswalk Engine is a part of a Proof-of-Concept for
third party engines to work with Apache Cordova. This currently only works with the
4.0.x branch of Apache Cordova found on GitHub, and as of yet, does not work with any
official Apache Cordova release. This code should still be considered experimental.
```
$ cordova plugin add cordova-plugin-crosswalk-webview
```

* Build
```
$ cordova build android
```
The build script will automatically fetch the Crosswalk WebView libraries from Crosswalk project download site (https://download.01.org/crosswalk/releases/crosswalk/android/) and build for both X86 and ARM architectures.

Directions (We're still trying to automate more of this, sorry):
For example, building android with Crosswalk generates:

Android-only:
```
/path/to/hello/platforms/android/build/outputs/apk/hello-x86-debug.apk
/path/to/hello/platforms/android/build/outputs/apk/hello-armv7-debug.apk
```

1. Pull down the `4.0.x` branch of [Apache Cordova](https://github.com/apache/cordova-android) found here (https://github.com/apache/cordova-android/tree/4.0.x)
2. Clone this repository.
3. Run `sh fetch_libs.sh` to download the Crosswalk library
4. Generate a project with `./bin/create`
5. Run Plugman: `plugman install --platform android --plugin <path_to_crosswalk_engine>/cordova-crosswalk-engine/ --project .`
6. Add the `libs/xwalk_core_library` as a dependency in `project.properties`. (Note: Relative Paths work for libraries, not absolute paths. Manually edit if necessary.)
Note that it is also possible to publish a multi-APK application on the Play Store that uses Crosswalk for Pre-L devices, and the (updatable) system webview for L+:

Cordova CLI:
To build Crosswalk-enabled apks, add this plugin and run:

1. Install the latest version of the Cordova CLI from npm (Requires at least 3.5.0-0.2.6)
2. Pull down the `4.0.x` branch of [Apache Cordova](https://github.com/apache/cordova-android) found here (https://github.com/apache/cordova-android/tree/4.0.x)
3. Clone this repository.
4. Run `sh fetch_libs.sh` to download the Crosswalk library
5. Create a project with `cordova create`
6. Add the Android platform with `cordova platform add <path to cordova-android>`
7. Add the Crosswalk Engine plugin with `cordova plugin add <path to crosswalk-engine-plugin>`
$ cordova build --release

Requirements:
To build System-webview apk, remove this plugin and run:

`fetch_libs.sh` requires `curl` and `unzip` to be installed, and on the current `PATH`.
$ cordova build --release -- --android-minSdkVersion=21
11 changes: 10 additions & 1 deletion libs/xwalk_core_library/xwalk.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ repositories {
url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
}
}

if (cdvBuildMultipleApks == null) {
ext.cdvBuildMultipleApks = true
}
if (cdvMinSdkVersion == null) {
ext.cdvMinSdkVersion = 14
}

dependencies {
compile 'org.xwalk:xwalk_core_library_beta:9.38.208.4'
compile 'org.xwalk:xwalk_core_library_beta:11+'
}

40 changes: 40 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "cordova-plugin-crosswalk-webview",
"version": "1.0.1-dev",
"description": "Changes the default WebView to CrossWalk",
"cordova": {
"id": "cordova-plugin-crosswalk-webview",
"platforms": [
"android"
]
},
"repository": {
"type": "git",
"url": "https://github.com/MobileChromeApps/cordova-crosswalk-engine.git"
},
"keywords": [
"cordova",
"chromium",
"crosswalk",
"webview",
"engine",
"ecosystem:cordova",
"cordova-android"
],
"engines": [
{
"name": "cordova-android",
"version": ">=4"
},
{
"name": "cordova-plugman",
"version": ">=4.2.0"
}
],
"author": "",
"license": "Apache 2.0",
"bugs": {
"url": "https://github.com/MobileChromeApps/cordova-crosswalk-engine/issues"
},
"homepage": "https://github.com/MobileChromeApps/cordova-crosswalk-engine"
}
34 changes: 20 additions & 14 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="org.apache.cordova.engine.crosswalk"
version="0.0.1-dev">
id="cordova-plugin-crosswalk-webview"
version="1.0.1-dev">

<name>Crosswalk Engine</name>
<description>Intel CrossWalk Engine</description>
<name>Crosswalk WebView Engine</name>
<description>Changes the default WebView to CrossWalk</description>
<license>Apache 2.0</license>
<keywords>cordova,chromium,crosswalk,webview</keywords>
<repo>https://github.com/infil00p/cordova-crosswalk-engine.git</repo>
<issue></issue>
<repo>https://github.com/MobileChromeApps/cordova-crosswalk-engine.git</repo>
<issue>https://github.com/MobileChromeApps/cordova-crosswalk-engine/issues</issue>

<engines>
<engine name="cordova-android" version=">=4.0.0-dev" />
<engine name="cordova-android" version=">=4" />
<engine name="cordova-plugman" version=">=4.2.0" /><!-- needed for gradleReference support -->
</engines>

<!-- android -->
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<preference name="webView" value="org.apache.cordova.engine.crosswalk.XWalkCordovaWebView" />
<preference name="webView" value="org.crosswalk.engine.XWalkWebViewEngine" />
</config-file>

<source-file src="src/android/XWalkCordovaWebView.java" target-dir="src/org/apache/cordova/engine/crosswalk" />
<source-file src="src/android/XWalkExposedJsApi.java" target-dir="src/org/apache/cordova/engine/crosswalk" />
<source-file src="src/android/XWalkCordovaResourceClient.java" target-dir="src/org/apache/cordova/engine/crosswalk" />
<source-file src="src/android/XWalkCordovaUiClient.java" target-dir="src/org/apache/cordova/engine/crosswalk" />
<source-file src="src/android/XWalkCordovaView.java" target-dir="src/org/apache/cordova/engine/crosswalk" />
<source-file src="src/android/XWalkWebViewEngine.java" target-dir="src/org/crosswalk/engine" />
<source-file src="src/android/XWalkExposedJsApi.java" target-dir="src/org/crosswalk/engine" />
<source-file src="src/android/XWalkCordovaResourceClient.java" target-dir="src/org/crosswalk/engine" />
<source-file src="src/android/XWalkCordovaUiClient.java" target-dir="src/org/crosswalk/engine" />
<source-file src="src/android/XWalkCordovaView.java" target-dir="src/org/crosswalk/engine" />
<source-file src="src/android/XWalkCordovaCookieManager.java" target-dir="src/org/crosswalk/engine" />

<framework src="libs/xwalk_core_library/xwalk.gradle" custom="true" type="gradleReference" />

<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</config-file>
</platform>
</plugin>
Loading