×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2013
    Posts
    3

    Problems using Nokia Push Notification Client API for Nokia Asha (J2ME) application

    Hi,

    I have implemented sample application that uses Nokia Push Notification Client API using Nokia Asha SDK (J2ME). But I am facing several problems in testing the functionality. The problems I am facing are listed below:

    1) I am able to install the EnvironmentSelector midlet(which can be used to change the environment to "Sandbox") on the emulator but not on the Nokia Asha 501 real device. The error message "EnvironmentSelector can't be installed. The system doesn't recognise who is trying to authorise the app. Please contact your service provider to get this fixed. C=DK;O=NokiaCoTest CA3;OU=Nokia Mobile Phones;CN=NokiaCoTest CA3" is being displayed while installing the midlet on real device. Could someone please let me know, what causing this installation issue on device.

    2) I have followed all the steps mentioned at http://developer.nokia.com/Community...tware_platform and implemented using Nokia Notification Client API. When I try to send sample Push Message from the created Service(at Nokia Notification API Developer Console), the MIDlet(running on emulator) is not receiving the push message always. Many times at the developer console, it is showing as "Error: Application not reachable". Could someone please let me know on how to resolve this issue.

    My sample implementation is as follows:
    1. private NotificationSession session = null;

    2. session = NotificationSessionFactory.openSession(main, /*My MIDlet */
    "com.nokiaasha.xyz.sampleexample", /*ServiceID created at Nokia Notification API Developer Console*/
    "sampleexample.xyz.nokiaasha.com", /*ApplicationID that is generated at Nokia Notification API Developer Console*/
    this);

    3. session.registerApplication();

    4. public void infoReceived(NotificationInfo info) {
    System.out.println("Notification Id:" + info.getNotificationId());
    }

    5. public void messageReceived(NotificationMessage message) {
    System.out.println("Notification Message:" + message.getPayload().getData());
    }

    6. public void stateChanged(NotificationState state) {
    switch (state.getSessionState()) {
    case NotificationState.STATE_OFFLINE:
    System.out.println(" stateChanged --- STATE_OFFLINE");
    break;

    case NotificationState.STATE_CONNECTING:
    System.out.println(" stateChanged --- STATE_CONNECTING");
    break;

    case NotificationState.STATE_ONLINE:
    System.out.println(" stateChanged --- STATE_ONLINE");
    try{
    session.getNotificationInformation();
    }catch (NotificationException e) {
    System.out.println(e.getMessage());
    }
    break;

    default:
    System.out.println(" stateChanged --- default");
    break;
    }
    }

    Please help me with your answers.

    Thanks,
    Dileep.

  2. #2
    Registered User
    Join Date
    Apr 2013
    Posts
    65

    Re: Problems using Nokia Push Notification Client API for Nokia Asha (J2ME) applicati

    Hi,
    I actually asked the Nokia Support Engineer, and he replied that for real device, it's by default production environment and you cannot change the environment. Due to that, for real device, you have to use production environment to test on real device, but the developer console will only send message thru sandbox environment, so you cannot receive the message. You need to implement a notification server.

    Best regards,
    Imgen

    Quote Originally Posted by dileep.m View Post
    Hi,

    I have implemented sample application that uses Nokia Push Notification Client API using Nokia Asha SDK (J2ME). But I am facing several problems in testing the functionality. The problems I am facing are listed below:

    1) I am able to install the EnvironmentSelector midlet(which can be used to change the environment to "Sandbox") on the emulator but not on the Nokia Asha 501 real device. The error message "EnvironmentSelector can't be installed. The system doesn't recognise who is trying to authorise the app. Please contact your service provider to get this fixed. C=DK;O=NokiaCoTest CA3;OU=Nokia Mobile Phones;CN=NokiaCoTest CA3" is being displayed while installing the midlet on real device. Could someone please let me know, what causing this installation issue on device.

    2) I have followed all the steps mentioned at http://developer.nokia.com/Community...tware_platform and implemented using Nokia Notification Client API. When I try to send sample Push Message from the created Service(at Nokia Notification API Developer Console), the MIDlet(running on emulator) is not receiving the push message always. Many times at the developer console, it is showing as "Error: Application not reachable". Could someone please let me know on how to resolve this issue.

    My sample implementation is as follows:
    1. private NotificationSession session = null;

    2. session = NotificationSessionFactory.openSession(main, /*My MIDlet */
    "com.nokiaasha.xyz.sampleexample", /*ServiceID created at Nokia Notification API Developer Console*/
    "sampleexample.xyz.nokiaasha.com", /*ApplicationID that is generated at Nokia Notification API Developer Console*/
    this);

    3. session.registerApplication();

    4. public void infoReceived(NotificationInfo info) {
    System.out.println("Notification Id:" + info.getNotificationId());
    }

    5. public void messageReceived(NotificationMessage message) {
    System.out.println("Notification Message:" + message.getPayload().getData());
    }

    6. public void stateChanged(NotificationState state) {
    switch (state.getSessionState()) {
    case NotificationState.STATE_OFFLINE:
    System.out.println(" stateChanged --- STATE_OFFLINE");
    break;

    case NotificationState.STATE_CONNECTING:
    System.out.println(" stateChanged --- STATE_CONNECTING");
    break;

    case NotificationState.STATE_ONLINE:
    System.out.println(" stateChanged --- STATE_ONLINE");
    try{
    session.getNotificationInformation();
    }catch (NotificationException e) {
    System.out.println(e.getMessage());
    }
    break;

    default:
    System.out.println(" stateChanged --- default");
    break;
    }
    }

    Please help me with your answers.

    Thanks,
    Dileep.

Similar Threads

  1. Replies: 7
    Last Post: 2012-03-22, 03:38
  2. WAP Push in J2ME client/server Application using Nokia's Personal WAP gateway
    By shaswata_jash in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-03-07, 10:28
  3. WAP Push in J2ME client/server Application
    By shaswata_jash in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-03-07, 10:25
  4. WAP Push in J2ME client/server Application
    By shaswata_jash in forum Mobile Java General
    Replies: 0
    Last Post: 2005-03-07, 10:18

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×