Display application icon for background service app on BlackBerry - 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.

Related

Is it possible to determine which App Icon is the default when doing Product Page Optimisation experiment on the icon?

With App Store's product page optimization, it is possible to A/B Test different default app icons.
Is there a way from within the app's code, at runtime, to determine in code with icon is the one the user sees?
Please note: This question is NOT about alternate app icons.
Nor it is about knowing if the default icon is being used.
I want to know with icon is the default.

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?

Blackberry Disappearing Icon

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

How to change the List Text colors in windows phone7 app

I submitted my Wp7 app but it was rejected for the reason is
Application content, such as text and visual
elements, must be visible and legible regardless of
the phone theme. For example, if the phone
theme changes from black background to white
background, the text and visual elements of your
application must be visible or legible.
Test Process Required:
1. Navigate to the Settings page in the app list.
2. Tap theme and change Background to 'Dark'.
3. Launch the application.
4. Verify that the text and visual elements of the
application are visible and legible.
5. Navigate back to the theme page under
Settings, and change Background to 'Light'
6. Launch the application.
7. Verify that the text and visual elements of the
application are visible and legible.
actually i am using ListBox in my Xmal page in that i have set baground color Block and font color is white. How to change Font color that when they Change Device Background color in Window phone7..please help me..How to resolve this ..
You could hard code your back and foreground colors in XAML or you could use the WindowsPhone Color resources.
MSDN Windows Phone Resources
To Solve this i showed a MessageBox to the User the first time he starts the application that the app is using his location and what the app is doing with it. Then you need to give an option in the application somewhere to turn the using of his location completely off, i added this to my apps settings page. And you could provide information about why you using location in a separate page and have the setting to turn it on and off there.
The MessageBox and the Turn off setting works my app got certified like this.

delay after clicking blackberry application icon

i can't seem to figure out the following situation:
when i i click on my blackberry app icon (within the simulator), the application pops up quick, no problems. however, when i take that same code and push it to my blackberry, there is a few seconds of wait time after the icon has been clicked.
can someone tell me how to minimize the delay? the first screen is NOTHING but an image inside a image field. i wanted to create a "splash" screen and i just show you a simple image.
after i click on the app icon (on my phone), i notice that there is activity because you see the arrows in the upper right-hand corner moving. but to the regular non-techie user, they won't know that the application has been started and they will just keep clicking the icon over and over again.
again, i click on the app icon and there is about a 3 second delay just to the image contained within the project folder. so we are not fetching the image from a remote site.
the simulator shows the image fast, but the phone creates a delay. any ideas how to minimize the delay after app icon click?
thank you.
ac
I figured it out. i just moved the instantiating and loading of several objects to a different class and later called those lines of code with an invokeLater method. my first screen only contains the image itself and the other class contains the rest of the code.

Resources