Blackberry Disappearing Icon - blackberry

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.

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.

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
}
});

Related

iPhone/iPad Status bar overlapping on app's header

I am using worklight 6.2 Consumer Edition on WAS Liberty Profile 8.5.5.1 Server. I am using jQuery Mobile 1.4.2 to develop UI. When I install app on iPhone/iPad, status bar of phone is hiding some part of my app's header.
How can I fix this issue (if its an issue)?
This works fine in a default new app with jQuery Mobile that was generated by Worklight Studio. As you can see, the status does not overlap the text.
You can also take a look at the Worklight Starter with jQuery Mobile edition, that also works on iOS w/out the status bar covering the top of app. Compare your CSS.
You need to provide a screen shot of what you're seeing, as well as provide a sample application where you are experiencing it. This issue originates from your code. Provide code.
One possible solution would be to add some margin-top to whichever element is at the top of your applicaiton's HTML.

iOS: Run code only after it's been added to the home screen

I'd like know if there's away to run a bit of code only after it's been installed to the home screen on iOS. This is for internal use only so I don't need it to work on other platforms. Just iOS.
Basically, I want to add a few custom icons to iOS devices that do specific things. One will open a PDF and that's the one I'm having a hard time working with.
So, here's the flow...
User goes to URL on their iOS based device, there is nothing to see here, but then they add the URL to their home screen. Once they click on the home screen icon, the page opens and redirects to the a PDF that lives online. The pdf can live online since they will always have wifi.
Any suggestions?

Display application icon for background service app on BlackBerry

I am working on an application which has background service functionality. I have successfully implementated the background service using the answer to "How can run background service application and UIApplication same time"
When I install the application on a simulator I can't see application icon. I have set and unset the property Do not display the application icon on the BlackBerry home screen. in BlackBerry_App_Descriptor.xml but the app icon still does not display.
Is this the default functionality? do apps with Alternate entry point selected not show an app icon?
How can I enable the app icon with the functionality of a background service ?
In order to show the App Icon, you need to specify two Icons (images) in the BlackBerry_App_Descriptor.xml file. Under Application Icons, add two image files and select "rollover" for one of those images. This would display an icon for your App even when it is hovered upon or clicked.
You definitely can do what you're asking.
You haven't shown the BlackBerry_App_Descriptor.xml file, but my guess is that it is where your problem is. For an app like yours, you probably have 2 or 3 different entry points. Many times, the normal UiApplication is one entry point, then maybe there's a background service entry point, or possibly a separate push notifications entry point.
For each of these, you can specify properties in the BlackBerry_App_Descriptor.xml file. For your main UI application, it should have Auto-run at startup and Do not display the application on the BlackBerry home screen unchecked (not checked!). You then also need to make sure an icon file is specified in the Icon Files section. You don't actually need the rollover icon, though, although you certainly can add it.
<AlternateEntryPoint Title="MyAppName" MainMIDletName="" ArgumentsForMain="" HomeScreenPosition="0" StartupTier="7"
IsSystemModule="false" IsAutostartup="false"
hasTitleResource="false" TitleResourceBundleKey="" TitleResourceBundleName=""
TitleResourceBundleClassName="" TitleResourceBundleRelativePath="">
<Icons>
<Icon CanonicalFileName="res/img/icon.png" IsFocus="false"/>
</Icons>
<KeywordResources KeywordResourceBundleName="" KeywordResourceBundleRelativePath="" KeywordResourceBundleClassName="" KeywordResourceBundleKey=""/>
</AlternateEntryPoint>
Then, for your background service, you would have Auto-run at startup and Do not display the application on the BlackBerry home screen both checked.
<AlternateEntryPoint Title="MyBackgroundService" MainMIDletName="" ArgumentsForMain="-background" HomeScreenPosition="0" StartupTier="7"
IsSystemModule="true" IsAutostartup="true"
hasTitleResource="false" TitleResourceBundleKey="" TitleResourceBundleName=""
TitleResourceBundleClassName="" TitleResourceBundleRelativePath="">
<Icons>
<Icon CanonicalFileName="res/img/icon.png" IsFocus="false"/>
</Icons>
<KeywordResources KeywordResourceBundleName="" KeywordResourceBundleRelativePath="" KeywordResourceBundleClassName="" KeywordResourceBundleKey=""/>
</AlternateEntryPoint>
Reference
Also, see this BlackBerry reference document, and take a look at the section titled Scheduling processes to run periodically.

iPad prevent page drag

I am writing an application for iPad using phonegap (Simple application using HTML5 and jQuery). The problem is the application window is draggable, as seen in image when I drag window down it comes down and when I leave window it goes up automatically. I don't want this behavior.
Try to set the UIWebViewBounce to NO in your file Cordova.plist.
Check this link: How to prevent app running in phone-gap from scrolling vertically?
Note: with this solution, you may disable the "landscape mode" of your app.
Hope this helps, let me know if this works for you mate

How to scroll the textbox to appropriate position when virtual keyboard pops-up in Blackberry

I am using J2ME, Lwuit and Blackberry api for developing my app.
My form contains textbox as well as toolbar. While touching the textbox, the virtual keyboard appears and then disappears. This is happening due to the toolbar. Even if I remove the toolbar, the textbox remains beneath the virtual keyboard instead of scrolling up.
Issue is happening for the touch phones, for which we have to use touch screen.
I want the textbox to scroll up to the appropriate level to make it convenient for user.
Did anybody faced the same issue! Please share the solution.
There is a bug in LWUIT in that specific feature. It might have been fixed in Codename One but I'm not sure.
Did you know that you need a different UI lib for Blackberry touch development? If you don't import this specific lib you can find foreign issues. You must import a lib called UI_RIM_Touch.jar, if you generate this project with the Resource editor, you can find this file in the root of your project. Try this.

Resources