mirror of
https://github.com/lampaa/com.lampa.startapp.git
synced 2026-05-20 00:01:31 +08:00
add support java 1.6
This commit is contained in:
@@ -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;
|
||||
|
||||
import android.content.Intent;
|
||||
@@ -7,9 +15,7 @@ import org.apache.cordova.CordovaPlugin;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
/**
|
||||
* Created by User on 16.05.2018.
|
||||
*/
|
||||
|
||||
public class Assets extends CordovaPlugin {
|
||||
protected static final String TAG = "startApp";
|
||||
protected boolean NO_PARSE_INTENT_VALS = false;
|
||||
|
||||
+19
-21
@@ -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
|
||||
|
||||
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.
|
||||
*/
|
||||
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
|
||||
switch (action) {
|
||||
case "start":
|
||||
this.start(args, callbackContext);
|
||||
break;
|
||||
case "check":
|
||||
this.check(args, callbackContext);
|
||||
break;
|
||||
case "receiver":
|
||||
this.receiver(args, callbackContext);
|
||||
break;
|
||||
case "unReceiver":
|
||||
this.receiver(args, callbackContext);
|
||||
break;
|
||||
case "getExtras":
|
||||
this.getExtras(callbackContext);
|
||||
break;
|
||||
case "getExtra":
|
||||
this.getExtra(args, callbackContext);
|
||||
break;
|
||||
if(action.equals("start")) {
|
||||
this.start(args, callbackContext);
|
||||
}
|
||||
else if(action.equals("check")) {
|
||||
this.check(args, callbackContext);
|
||||
}
|
||||
else if(action.equals("receiver")) {
|
||||
this.receiver(args, callbackContext);
|
||||
}
|
||||
else if(action.equals("unReceiver")) {
|
||||
this.receiver(args, callbackContext);
|
||||
}
|
||||
else if(action.equals("getExtras")) {
|
||||
this.getExtras(callbackContext);
|
||||
}
|
||||
else if(action.equals("getExtra")) {
|
||||
this.getExtra(args, callbackContext);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -104,7 +102,7 @@ public class startApp extends Assets {
|
||||
|
||||
|
||||
//cordova.getActivity().getApplicationContext()
|
||||
cordova.getContext().registerReceiver(receiver, filter);
|
||||
cordova.getActivity().getApplicationContext().registerReceiver(receiver, filter);
|
||||
broadcastReceiverHashMap.put(receiver.hashCode(), receiver);
|
||||
|
||||
PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, receiver.hashCode());
|
||||
|
||||
Reference in New Issue
Block a user