Merge branch 'master' into StudioProjectCompat
Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 478 KiB After Width: | Height: | Size: 139 KiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 222 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 286 KiB |
Before Width: | Height: | Size: 217 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 493 KiB After Width: | Height: | Size: 138 KiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 207 KiB |
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 292 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 7.7 KiB |
@ -19,6 +19,7 @@
|
||||
package org.apache.cordova;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import org.apache.cordova.CordovaPlugin;
|
||||
@ -51,10 +52,18 @@ public interface CordovaInterface {
|
||||
/**
|
||||
* Get the Android activity.
|
||||
*
|
||||
* If a custom engine lives outside of the Activity's lifecycle the return value may be null.
|
||||
*
|
||||
* @return the Activity
|
||||
*/
|
||||
public abstract Activity getActivity();
|
||||
|
||||
|
||||
/**
|
||||
* Get the Android context.
|
||||
*
|
||||
* @return the Context
|
||||
*/
|
||||
public Context getContext();
|
||||
|
||||
/**
|
||||
* Called when a message is sent to plugin.
|
||||
|
@ -21,6 +21,7 @@ package org.apache.cordova;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
@ -85,6 +86,11 @@ public class CordovaInterfaceImpl implements CordovaInterface {
|
||||
return activity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Context getContext() {
|
||||
return activity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object onMessage(String id, Object data) {
|
||||
if ("exit".equals(id)) {
|
||||
|