diff --git a/bin/templates/project/res/drawable-land-hdpi/screen.png b/bin/templates/project/res/drawable-land-hdpi/screen.png index a61e2b1a3..2d564f49c 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 f3934cdcc..c7eae7ede 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 a1b697c53..3bf1ec2e9 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 79f2f0945..987a92462 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 2f5683808..ef9fc7400 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 ff6c13c28..8f9a458e1 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 5d6a28a82..5875561d3 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 65ad163ab..725420620 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 ea1569359..9034b68fd 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 c2e804217..95dc8d849 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 9c7df083d..9b6bfe4a8 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 68c799896..ec655cde1 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 4d2763448..538426124 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 cd5032a4f..c5fcaeb64 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 e79c6062c..a18167be1 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 ec7ffbfbd..9e3eec364 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 38c2bf5e1..a56928965 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 53e57538d..3c322f2ea 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 3b8468f3b..ff9068346 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 8fdbff5ea..9a6e9245f 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)) {