diff --git a/framework/src/org/apache/cordova/CordovaPreferences.java b/framework/src/org/apache/cordova/CordovaPreferences.java index 536f25a2..ed0b9b89 100644 --- a/framework/src/org/apache/cordova/CordovaPreferences.java +++ b/framework/src/org/apache/cordova/CordovaPreferences.java @@ -133,6 +133,9 @@ public class CordovaPreferences { } else if (name.equals("splashscreen")) { // Note: We should probably pass in the classname for the variable splash on splashscreen! int resource = action.getResources().getIdentifier(value, "drawable", action.getClass().getPackage().getName()); + if(resource == 0) { + resource = action.getResources().getIdentifier(value, "drawable", action.getPackageName()); + } action.getIntent().putExtra(name, resource); } else if(name.equals("backgroundcolor")) { diff --git a/framework/src/org/apache/cordova/SplashScreenInternal.java b/framework/src/org/apache/cordova/SplashScreenInternal.java index 605fce7d..715e4182 100644 --- a/framework/src/org/apache/cordova/SplashScreenInternal.java +++ b/framework/src/org/apache/cordova/SplashScreenInternal.java @@ -54,6 +54,9 @@ public class SplashScreenInternal extends CordovaPlugin { String splashResource = preferences.getString("SplashScreen", null); if (splashResource != null) { drawableId = cordova.getActivity().getResources().getIdentifier(splashResource, "drawable", cordova.getActivity().getClass().getPackage().getName()); + if (drawableId == 0) { + drawableId = cordova.getActivity().getResources().getIdentifier(splashResource, "drawable", cordova.getActivity().getPackageName()); + } preferences.set("SplashDrawableId", drawableId); } }