[ 
https://issues.apache.org/jira/browse/CB-8513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Shakhnazarov resolved CB-8513.
-------------------------------------
    Resolution: Duplicate

> Load resource from wrong package
> --------------------------------
>
>                 Key: CB-8513
>                 URL: https://issues.apache.org/jira/browse/CB-8513
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 3.5.0
>            Reporter: Van Dev
>            Priority: Minor
>
> 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());
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to