Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
3.5.0
-
None
-
None
Description
In CordovaActivity.java (line 351) and CordovaPreferences.java (line 133), both use the following to get the splash screen:
getResources().getIdentifier(splash, "drawable", getClass().getPackage().getName());
But in some apps, the class package name does't have to match what you define in the AndroidManifest.xml. It won't load the resource.
So it should be fixed like following, which is how the ConfigXmlParser load the xml config:
this.splashscreen = getResources().getIdentifier(splash, "drawable", getClass().getPackage().getName());;
if (this.splashscreen == 0) {
// reload by the package name defined in AndroidManifest.xml
this.splashscreen = getResources().getIdentifier(splash, "drawable", this.getPackageName());
}
Attachments
Issue Links
- is a clone of
-
CB-8536 Splash screens not found on Android when application package name differs from class package name
- Closed