Merge remote-tracking branch 'origin/master'

This commit is contained in:
Roman 2015-01-20 12:45:38 +03:00
parent 51e1071fe6
commit bfd1908ea0
7 changed files with 94 additions and 144 deletions

View File

@ -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);
});
```

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="org.apache.cordova.startapp"
version="0.3.0">
id="com.lampa.startapp"
version="0.0.4">
<name>startApp</name>
<description>Cordova startApp Plugin</description>
<license>Apache 2.0</license>
<keywords>cordova,startapp</keywords>
<description>Phonegap 3 plugin for check or launch other application in android device.</description>
<license>MIT</license>
<keywords>cordova,startapp,lampa</keywords>
<js-module src="www/startApp.js" name="startapp">
<merges target="navigator.startApp" />
@ -17,25 +17,24 @@
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="startApp">
<param name="android-package" value="org.apache.cordova.startapp.startApp"/>
<param name="android-package" value="com.lampa.startapp.startApp"/>
</feature>
</config-file>
<source-file src="src/android/startApp.java" target-dir="src/org/apache/cordova/startapp" />
<source-file src="src/android/startApp.java" target-dir="src/com/lampa/startapp" />
</platform>
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="startApp">
<param name="ios-package" value="startApp"/>
</feature>
</config-file>
<header-file src="src/ios/startApp.h"/>
<source-file src="src/ios/startApp.m"/>
</platform>
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="startApp">
<param name="ios-package" value="startApp"/>
</feature>
</config-file>
<header-file src="src/ios/startApp.h"/>
<source-file src="src/ios/startApp.m"/>
</platform>
</plugin>

View File

@ -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;

View File

@ -1,36 +1,22 @@
<!DOCTYPE html>
<!--
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
-->
<html>
<head>
<meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,initial-scale=1.0" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Cordova Mobile Spec</title>
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8">
<script type="text/javascript" charset="utf-8" src="cordova-incl.js"></script>
<script type="text/javascript" charset="utf-8" src="startApp.js"></script>
<script type="text/javascript" charset="utf-8" src="main.js"></script>
<title>com.lampa.startApp test</title>
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8">
<script type="text/javascript" charset="utf-8" src="cordova-incl.js"></script>
<script type="text/javascript" charset="utf-8" src="startApp.js"></script>
<script type="text/javascript" charset="utf-8" src="main.js"></script>
</head>
<body onload="init();" id="stage" class="theme">
</body>

View File

@ -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

View File

@ -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);
}

View File

@ -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);
}