diff --git a/README.md b/README.md
index 6c69a66..2833cae 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,12 @@
cordova-plugin-startapp # Upd 18.12.2014
===========================================================================
-
-
Phonegap 3.x.x plugin for check or launch other application in android device.
-Install: ```cordova plugin add https://github.com/lampaa/org.apache.cordova.startapp.git```
+Install: ```cordova plugin add https://github.com/lampaa/com.lampa.startapp.git```
-Delete: ```cordova plugin rm org.apache.cordova.startapp```
+Delete: ```cordova plugin rm com.lampa.startapp```
Manually installation for Android:
```on progress...```
@@ -31,11 +29,11 @@ function(error) { /* error */
_Start application without parameters_
```js
-navigator.startApp.start("com.app.name", function(message) { /* success */
+navigator.startApp.start("com.application.name", function(message) { /* success */
console.log(message); // => OK
},
function(error) { /* error */
- console.log('47', error);
+ console.log(error);
});
```
diff --git a/plugin.xml b/plugin.xml
index c7dbfcc..c37bac8 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -1,13 +1,13 @@
+ id="com.lampa.startapp"
+ version="0.0.4">
startApp
- Cordova startApp Plugin
- Apache 2.0
- cordova,startapp
+ Phonegap 3 plugin for check or launch other application in android device.
+ MIT
+ cordova,startapp,lampa
@@ -17,25 +17,24 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/android/startApp.java b/src/android/startApp.java
index 11501d3..3014034 100644
--- a/src/android/startApp.java
+++ b/src/android/startApp.java
@@ -1,22 +1,11 @@
-/*
- 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.
+/**
+ com.lampa.startapp
+ https://github.com/lampaa/com.lampa.startapp
+
+ Phonegap 3 plugin for check or launch other application in android device (iOS support).
+ bug tracker: https://github.com/lampaa/org.apache.cordova.startapp/issues
*/
-package org.apache.cordova.startapp;
+package com.lampa.startapp;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
@@ -67,10 +56,7 @@ public class startApp extends CordovaPlugin {
* startApp
*/
public void start(JSONArray args, CallbackContext callback) {
- /**
- * arguments
- * ['com.application.name']
- */
+
String com_name = null;
String activity = null;
Intent LaunchIntent;
diff --git a/test/index.html b/test/index.html
index f0f283c..adac768 100644
--- a/test/index.html
+++ b/test/index.html
@@ -1,36 +1,22 @@
-
-
- Cordova Mobile Spec
-
-
-
-
-
+ com.lampa.startApp test
+
+
+
+
diff --git a/test/main.js b/test/main.js
index b5d87c9..c1a153e 100644
--- a/test/main.js
+++ b/test/main.js
@@ -1,25 +1,10 @@
-/*
- *
- * 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.
- *
+/**
+ com.lampa.startapp
+ https://github.com/lampaa/com.lampa.startapp
+
+ Phonegap 3 plugin for check or launch other application in android device (iOS support).
+ bug tracker: https://github.com/lampaa/org.apache.cordova.startapp/issues
*/
-
-
function init() {
/**
* check the application is installed
diff --git a/www/startApp.js b/www/startApp.js
index 89016fa..5d18953 100644
--- a/www/startApp.js
+++ b/www/startApp.js
@@ -1,36 +1,33 @@
-/*
- *
- * 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.
- *
- * to phonegap 3.5.*
+/**
+ com.lampa.startapp
+ https://github.com/lampaa/com.lampa.startapp
+
+ Phonegap 3 plugin for check or launch other application in android device (iOS support).
+ bug tracker: https://github.com/lampaa/org.apache.cordova.startapp/issues
+
+ !! THIS SCRIPT FILE TO CORDOVA 3.5.*
+ If you are using a version lower than 3.5, read this theme: https://github.com/lampaa/org.apache.cordova.startapp/issues/5#issuecomment-49974214
*/
-
var exec = require('cordova/exec');
-/** Open a native alert dialog, with a customizable title and button text.
- *
- * @param {String} message app name
- * @param {Function} completeCallback The callback that is called when open app
- */
module.exports = {
+ /**
+ * Check application for installed on device
+ *
+ * @param {String} message app name
+ * @param {Function} completeCallback The callback that is called when open app
+ * @param {Function} errorCallback The callback that is called when application is not installed
+ */
check: function(message, completeCallback, errorCallback) {
exec(completeCallback, errorCallback, "startApp", "check", [message]);
},
+ /**
+ * Start application on device
+ *
+ * @param {Mixed} message params, view documentation https://github.com/lampaa/com.lampa.startapp
+ * @param {Function} completeCallback The callback that is called when open app
+ * @param {Function} errorCallback The callback that is called when an error occurred when the program starts.
+ */
start: function(message, completeCallback, errorCallback) {
exec(completeCallback, errorCallback, "startApp", "start", (typeof message === 'string') ? [message] : message);
}
diff --git a/www/startApp.prev.js b/www/startApp.prev.js
index 29a69cd..f9be4b2 100644
--- a/www/startApp.prev.js
+++ b/www/startApp.prev.js
@@ -1,36 +1,35 @@
-cordova.define("org.apache.cordova.startapp.startapp", function(require, exports, module) { /*
- *
- * 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.
- *
- * to phonegap 3.0.*
-*/
+cordova.define("com.lampa.startapp.startApp", function(require, exports, module) {
+/**
+ com.lampa.startapp
+ https://github.com/lampaa/com.lampa.startapp
+
+ Phonegap 3 plugin for check or launch other application in android device (iOS support).
+ bug tracker: https://github.com/lampaa/org.apache.cordova.startapp/issues
+
+ !! THIS SCRIPT FILE TO CORDOVA 3.0.*
+ If you are using a version upper than 3.5, read this theme: https://github.com/lampaa/org.apache.cordova.startapp/issues/5#issuecomment-49974214
+ */
var exec = require('cordova/exec');
-/** Open a native alert dialog, with a customizable title and button text.
- *
- * @param {String} message app name
- * @param {Function} completeCallback The callback that is called when open app
- */
module.exports = {
+ /**
+ * Check application for installed on device
+ *
+ * @param {String} message app name
+ * @param {Function} completeCallback The callback that is called when open app
+ * @param {Function} errorCallback The callback that is called when application is not installed
+ */
check: function(message, completeCallback, errorCallback) {
exec(completeCallback, errorCallback, "startApp", "check", [message]);
},
+ /**
+ * Start application on device
+ *
+ * @param {Mixed} message params, view documentation https://github.com/lampaa/com.lampa.startapp
+ * @param {Function} completeCallback The callback that is called when open app
+ * @param {Function} errorCallback The callback that is called when an error occurred when the program starts.
+ */
start: function(message, completeCallback, errorCallback) {
exec(completeCallback, errorCallback, "startApp", "start", (typeof message === 'string') ? [message] : message);
}