mirror of
https://github.com/lampaa/com.lampa.startapp.git
synced 2024-10-06 07:42:06 +08:00
add support java 1.6
This commit is contained in:
parent
8da23d0d69
commit
9537dc9816
@ -4,7 +4,8 @@
|
|||||||
Phonegap plugin for check or launch other application, get extras in phonegap app.
|
Phonegap plugin for check or launch other application, get extras in phonegap app.
|
||||||
|
|
||||||
|
|
||||||
Last version 6.1.5
|
Last version 6.1.6
|
||||||
|
* Add support java 1.6
|
||||||
* Add support java 1.7
|
* Add support java 1.7
|
||||||
* Add full support activityForResult, sendBroadcast and RegisterReceiver.
|
* Add full support activityForResult, sendBroadcast and RegisterReceiver.
|
||||||
* Add types of extras.
|
* Add types of extras.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "com.lampa.startapp",
|
"name": "com.lampa.startapp",
|
||||||
"version": "6.1.5",
|
"version": "6.1.6",
|
||||||
"description": "Phonegap plugin for check or launch other application in android device.",
|
"description": "Phonegap plugin for check or launch other application in android device.",
|
||||||
"cordova": {
|
"cordova": {
|
||||||
"id": "com.lampa.startapp",
|
"id": "com.lampa.startapp",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
||||||
id="com.lampa.startapp"
|
id="com.lampa.startapp"
|
||||||
version="6.1.5">
|
version="6.1.6">
|
||||||
|
|
||||||
<name>startApp</name>
|
<name>startApp</name>
|
||||||
<description>Phonegap plugin for check or launch other application in android device.</description>
|
<description>Phonegap plugin for check or launch other application in android device.</description>
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/**
|
||||||
|
com.lampa.startapp, ver. 6.1.6
|
||||||
|
https://github.com/lampaa/com.lampa.startapp
|
||||||
|
|
||||||
|
Phonegap plugin for check or launch other application in android device (iOS support).
|
||||||
|
bug tracker: https://github.com/lampaa/com.lampa.startapp/issues
|
||||||
|
*/
|
||||||
|
|
||||||
package com.lampa.startapp;
|
package com.lampa.startapp;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -7,9 +15,7 @@ import org.apache.cordova.CordovaPlugin;
|
|||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by User on 16.05.2018.
|
|
||||||
*/
|
|
||||||
public class Assets extends CordovaPlugin {
|
public class Assets extends CordovaPlugin {
|
||||||
protected static final String TAG = "startApp";
|
protected static final String TAG = "startApp";
|
||||||
protected boolean NO_PARSE_INTENT_VALS = false;
|
protected boolean NO_PARSE_INTENT_VALS = false;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
com.lampa.startapp, ver. 6.1.3
|
com.lampa.startapp, ver. 6.1.6
|
||||||
https://github.com/lampaa/com.lampa.startapp
|
https://github.com/lampaa/com.lampa.startapp
|
||||||
|
|
||||||
Phonegap plugin for check or launch other application in android device (iOS support).
|
Phonegap plugin for check or launch other application in android device (iOS support).
|
||||||
@ -38,25 +38,23 @@ public class startApp extends Assets {
|
|||||||
* @return Always return true.
|
* @return Always return true.
|
||||||
*/
|
*/
|
||||||
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
|
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
|
||||||
switch (action) {
|
if(action.equals("start")) {
|
||||||
case "start":
|
this.start(args, callbackContext);
|
||||||
this.start(args, callbackContext);
|
}
|
||||||
break;
|
else if(action.equals("check")) {
|
||||||
case "check":
|
this.check(args, callbackContext);
|
||||||
this.check(args, callbackContext);
|
}
|
||||||
break;
|
else if(action.equals("receiver")) {
|
||||||
case "receiver":
|
this.receiver(args, callbackContext);
|
||||||
this.receiver(args, callbackContext);
|
}
|
||||||
break;
|
else if(action.equals("unReceiver")) {
|
||||||
case "unReceiver":
|
this.receiver(args, callbackContext);
|
||||||
this.receiver(args, callbackContext);
|
}
|
||||||
break;
|
else if(action.equals("getExtras")) {
|
||||||
case "getExtras":
|
this.getExtras(callbackContext);
|
||||||
this.getExtras(callbackContext);
|
}
|
||||||
break;
|
else if(action.equals("getExtra")) {
|
||||||
case "getExtra":
|
this.getExtra(args, callbackContext);
|
||||||
this.getExtra(args, callbackContext);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -104,7 +102,7 @@ public class startApp extends Assets {
|
|||||||
|
|
||||||
|
|
||||||
//cordova.getActivity().getApplicationContext()
|
//cordova.getActivity().getApplicationContext()
|
||||||
cordova.getContext().registerReceiver(receiver, filter);
|
cordova.getActivity().getApplicationContext().registerReceiver(receiver, filter);
|
||||||
broadcastReceiverHashMap.put(receiver.hashCode(), receiver);
|
broadcastReceiverHashMap.put(receiver.hashCode(), receiver);
|
||||||
|
|
||||||
PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, receiver.hashCode());
|
PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, receiver.hashCode());
|
||||||
|
Loading…
Reference in New Issue
Block a user