Reputation: 83
Has anyone experienced this before?
Whenever I install my app in a 9900 device, the icon appears to be fine, but after a while (it happens in random), the icon just turns into a blank question mark icon (like I never added an icon when I built the app). I've tested it on a 9700 device and it appears to be okay, I've installed it in the 9700 for several days now and the icon doesn't disappear.
I wrote my BlackBerry Java app using Eclipse Indigo with the Blackberry plugin, and added my icon using the BlackBerry App Descriptor editor. I followed the usual step of adding the icon by clicking the "Add" in the Icon Files section and browse my PNG file in res/img/icon.png. I have a 64x48 png file. I'm building it using the Eclipse BB 5.0 plugin.
I don't know what I'm doing wrong.
Thanks in advance.
Upvotes: 0
Views: 144
Reputation:
Seems that it is a bug in the particular RIM OS version. To overcome this, use application descriptor with icon set as you do and set the icon explicitly in your application
.
There's a HomeScreen class in RIM API. Use it and invoke its method:
public static final void updateIcon(Bitmap newIcon)
to set the icon again when your application starts. To access correctly the icon file included to your project, check this post. I described there how does blackberry work with embedded files.
To avoid UI event locking upon setting application icon, use invokeLater()
approach, like that:
UiApplication.
getUiApplication().
invokeLater(
new Runnable() {
public void run() {
// set app icon here
}
});
Upvotes: 1
Reputation: 605
I had a similar problem, whenever I load a project on my device for testing (my simulator doesn't work for some reason) my icon goes back to the default one instead of using my own icon. I saw from a another post that if you refresh the img folder under res, and then load the project onto your device, it will appear (although this did not work for me, but it may for you).
I just reset my device by pulling out the battery and my custom icon appears.
Upvotes: 1