diff --git a/bin/templates/project/res/drawable-land-hdpi/screen.png b/bin/templates/project/res/drawable-land-hdpi/screen.png index a61e2b1a..2d564f49 100644 Binary files a/bin/templates/project/res/drawable-land-hdpi/screen.png and b/bin/templates/project/res/drawable-land-hdpi/screen.png differ diff --git a/bin/templates/project/res/drawable-land-ldpi/screen.png b/bin/templates/project/res/drawable-land-ldpi/screen.png index f3934cdc..c7eae7ed 100644 Binary files a/bin/templates/project/res/drawable-land-ldpi/screen.png and b/bin/templates/project/res/drawable-land-ldpi/screen.png differ diff --git a/bin/templates/project/res/drawable-land-mdpi/screen.png b/bin/templates/project/res/drawable-land-mdpi/screen.png index a1b697c5..3bf1ec2e 100644 Binary files a/bin/templates/project/res/drawable-land-mdpi/screen.png and b/bin/templates/project/res/drawable-land-mdpi/screen.png differ diff --git a/bin/templates/project/res/drawable-land-xhdpi/screen.png b/bin/templates/project/res/drawable-land-xhdpi/screen.png index 79f2f094..987a9246 100644 Binary files a/bin/templates/project/res/drawable-land-xhdpi/screen.png and b/bin/templates/project/res/drawable-land-xhdpi/screen.png differ diff --git a/bin/templates/project/res/drawable-land-xxhdpi/screen.png b/bin/templates/project/res/drawable-land-xxhdpi/screen.png index 2f568380..ef9fc740 100644 Binary files a/bin/templates/project/res/drawable-land-xxhdpi/screen.png and b/bin/templates/project/res/drawable-land-xxhdpi/screen.png differ diff --git a/bin/templates/project/res/drawable-land-xxxhdpi/screen.png b/bin/templates/project/res/drawable-land-xxxhdpi/screen.png index ff6c13c2..8f9a458e 100644 Binary files a/bin/templates/project/res/drawable-land-xxxhdpi/screen.png and b/bin/templates/project/res/drawable-land-xxxhdpi/screen.png differ diff --git a/bin/templates/project/res/drawable-port-hdpi/screen.png b/bin/templates/project/res/drawable-port-hdpi/screen.png index 5d6a28a8..5875561d 100644 Binary files a/bin/templates/project/res/drawable-port-hdpi/screen.png and b/bin/templates/project/res/drawable-port-hdpi/screen.png differ diff --git a/bin/templates/project/res/drawable-port-ldpi/screen.png b/bin/templates/project/res/drawable-port-ldpi/screen.png index 65ad163a..72542062 100644 Binary files a/bin/templates/project/res/drawable-port-ldpi/screen.png and b/bin/templates/project/res/drawable-port-ldpi/screen.png differ diff --git a/bin/templates/project/res/drawable-port-mdpi/screen.png b/bin/templates/project/res/drawable-port-mdpi/screen.png index ea156935..9034b68f 100644 Binary files a/bin/templates/project/res/drawable-port-mdpi/screen.png and b/bin/templates/project/res/drawable-port-mdpi/screen.png differ diff --git a/bin/templates/project/res/drawable-port-xhdpi/screen.png b/bin/templates/project/res/drawable-port-xhdpi/screen.png index c2e80421..95dc8d84 100644 Binary files a/bin/templates/project/res/drawable-port-xhdpi/screen.png and b/bin/templates/project/res/drawable-port-xhdpi/screen.png differ diff --git a/bin/templates/project/res/drawable-port-xxhdpi/screen.png b/bin/templates/project/res/drawable-port-xxhdpi/screen.png index 9c7df083..9b6bfe4a 100644 Binary files a/bin/templates/project/res/drawable-port-xxhdpi/screen.png and b/bin/templates/project/res/drawable-port-xxhdpi/screen.png differ diff --git a/bin/templates/project/res/drawable-port-xxxhdpi/screen.png b/bin/templates/project/res/drawable-port-xxxhdpi/screen.png index 68c79989..ec655cde 100644 Binary files a/bin/templates/project/res/drawable-port-xxxhdpi/screen.png and b/bin/templates/project/res/drawable-port-xxxhdpi/screen.png differ diff --git a/bin/templates/project/res/mipmap-hdpi/icon.png b/bin/templates/project/res/mipmap-hdpi/icon.png index 4d276344..53842612 100644 Binary files a/bin/templates/project/res/mipmap-hdpi/icon.png and b/bin/templates/project/res/mipmap-hdpi/icon.png differ diff --git a/bin/templates/project/res/mipmap-ldpi/icon.png b/bin/templates/project/res/mipmap-ldpi/icon.png index cd5032a4..c5fcaeb6 100644 Binary files a/bin/templates/project/res/mipmap-ldpi/icon.png and b/bin/templates/project/res/mipmap-ldpi/icon.png differ diff --git a/bin/templates/project/res/mipmap-mdpi/icon.png b/bin/templates/project/res/mipmap-mdpi/icon.png index e79c6062..a18167be 100644 Binary files a/bin/templates/project/res/mipmap-mdpi/icon.png and b/bin/templates/project/res/mipmap-mdpi/icon.png differ diff --git a/bin/templates/project/res/mipmap-xhdpi/icon.png b/bin/templates/project/res/mipmap-xhdpi/icon.png index ec7ffbfb..9e3eec36 100644 Binary files a/bin/templates/project/res/mipmap-xhdpi/icon.png and b/bin/templates/project/res/mipmap-xhdpi/icon.png differ diff --git a/bin/templates/project/res/mipmap-xxhdpi/icon.png b/bin/templates/project/res/mipmap-xxhdpi/icon.png index 38c2bf5e..a5692896 100644 Binary files a/bin/templates/project/res/mipmap-xxhdpi/icon.png and b/bin/templates/project/res/mipmap-xxhdpi/icon.png differ diff --git a/bin/templates/project/res/mipmap-xxxhdpi/icon.png b/bin/templates/project/res/mipmap-xxxhdpi/icon.png index 53e57538..3c322f2e 100644 Binary files a/bin/templates/project/res/mipmap-xxxhdpi/icon.png and b/bin/templates/project/res/mipmap-xxxhdpi/icon.png differ diff --git a/framework/src/org/apache/cordova/CordovaInterface.java b/framework/src/org/apache/cordova/CordovaInterface.java index 3b8468f3..ff906834 100755 --- a/framework/src/org/apache/cordova/CordovaInterface.java +++ b/framework/src/org/apache/cordova/CordovaInterface.java @@ -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. diff --git a/framework/src/org/apache/cordova/CordovaInterfaceImpl.java b/framework/src/org/apache/cordova/CordovaInterfaceImpl.java index 8fdbff5e..9a6e9245 100644 --- a/framework/src/org/apache/cordova/CordovaInterfaceImpl.java +++ b/framework/src/org/apache/cordova/CordovaInterfaceImpl.java @@ -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)) {