Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8281313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:59:08+00:00 2026-06-08T09:59:08+00:00

Iam using push notification to show notification. Its working fine by Alternate Entry point.

  • 0

Iam using push notification to show notification. Its working fine by Alternate Entry point. Background application will listen for notifications. When I click on a notification, I want to open a specific page on my UI application. How is it done? I tried using the following code, but it will alway load the Ui from the starting page. How can I load a specific page if the app is already running. Else load the UI from the begining page. Also I want to pass some values from the Background app to the UI Application.

try {
     ApplicationDescriptor[] appDescriptors = 
         CodeModuleManager.getApplicationDescriptors(CodeModuleManager.getModuleHandle("MYAPP"));
     ApplicationDescriptor appDescriptor = 
         new ApplicationDescriptor(appDescriptors[0], new String[] {"MYAPP"});
     ApplicationManager.getApplicationManager().runApplication(appDescriptor);
} catch (ApplicationManagerException e) {
        e.printStackTrace();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T09:59:12+00:00Added an answer on June 8, 2026 at 9:59 am

    You are already transferring data from the background to the main UI Application (the string "MYAPP").

    Your application (the one listed in your previous question) starts up, and checks the arguments passed to it, and then determines whether to run in the background, or as a normal UI Application.

    You can just add more arguments. In the code above, change it to something like this:

    ApplicationDescriptor appDescriptor = 
         new ApplicationDescriptor(appDescriptors[0], 
                                   new String[] { "MYAPP", "4", "FirstScreen" });
    

    Then, in your UiApplication subclass (e.g. in App.java), you can change it to

    public static void main(String[] args)
    {
        Application theApp = null;
    
        switch (args.length) {
        case 2:
            // initial screen and number of notifications provided
            theApp = new App(args[2]);
            app.setNumberOfNotificationsReceived(Integer.parseInt(args[1]);
            break;
        case 1: 
            // just the number of notifications was provided, not an initial screen name
            theApp = new App();
            app.setNumberOfNotificationsReceived(Integer.parseInt(args[1]);
            break;
        case 0:
        default:
            // no arguments .. launch the background application
            BackgroundApplication app = new BackgroundApplication();
            app.setupBackgroundApplication();
            theApp = app;
            break;
        }
    
        theApp.enterEventDispatcher();
    }
    

    … where I’ve added the setNumberOfNotificationsReceived() method and the App(String) constructor in your App class. Those are just examples. Make them whatever you want.

    App.java:

    public App()
    {        
        // Push a screen onto the UI stack for rendering.
        pushScreen(new DefaultScreen());
    } 
    
    public App(String screenName) {
        if (screenName.equalsIgnoreCase("FirstScreen")) {
            pushScreen(new FirstScreen());
        } else {
            pushScreen(new DefaultScreen());
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an application with push notification alerts using Google C2DM service. Can
I have implemented whole push notification service for my application using easyapns . I
I have used Push notification in my application, when the notification arrives i will
I am developing android push notification application using C2DM,I am facing some problems in
I am using push notification using urban airship in my application using the documentation
I am doing push notification for android using C2DM. it works well. but while
I am trying to send push notification to iPhone using Java-pns but I am
I am using the APNS for receiving push notifications in my application. The problem
Iam using applet for an application. In that when ever a conditin satifies,it has
Currently I am using APNS PHP for push notification. The problem is I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.