質問

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top