« Return to Thread: Midlet autostart question

Re: Midlet autostart question

by josergc :: Rate this Message:

Reply to Author | View in Thread

Hi Samo,

Thanks for your patience, there is the answer from BenQ:

This is not a JSR257 property and it is not available for the T80 and the emulator. This is “Nokia 6131NFC” proprietary behavior. In the T80 the only way to know if a MIDlet was started by Push OR manually is to use the listConnections API of the PushRegistry passing TRUE in parameter. Here a snipped code to how to do:

 

protected void startApp() {

           

            //Check if the startup has been due to an incoming data.

        String connections[] = PushRegistry.listConnections(true);

 

        if (connections.length > 0) {

            // MIDlet started by a push connection

            System.out.println(" STARTED BY PUSH ENTRY AVAILABLE : connections = "+connections[0]);          

        } else {

           // There are not any pending data, but open the connection for later use.

           connections = PushRegistry.listConnections(false);

           if (connections.length > 0) {

              System.out.println(" STARTED MANUALLY ");  

           }

       }

}

 « Return to Thread: Midlet autostart question