×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2012
    Posts
    1

    Smile notification on nokia S40

    Good day!

    I am doing an IM application on S40 using JAVA ME. I would like to know, when the application is closed, how to get notify(prompt a dialog with the message and icon on the status bar) when a new message arrives. I tried with push notification but it doesn't help me, Although I can wake my application up with the network(push with socket) or sms, I can't have either a dialog(prompt dialog when notification occurs) with an custom message nor set icon on status bar.

    I believed it can only work on symbian devices because the app can run in background until when I saw it on whatsapp application for s40, I went through all the s40 api I couldn't make it.

    Can someone have any idea about?

    Thanks

    Ronald TAMBAT
    Developer at HowzIT
    South Africa

  2. #2
    Super Contributor
    Join Date
    Jan 2009
    Location
    Melbourne, Australia
    Posts
    2,578

    Re: notification on nokia S40

    OK, so let me prefix this by saying that I am NOT a java expert, so if this doesn't help, I probably won't be able to add anything else.

    There are two issues here, getting your app launched and displaying a notification.

    For the first part, there are several documents on wiki about using PushRegistry - like How_to_launch_a_MIDlet_via_SMS_remotely_or_locally_via_an_Alarm_with_PushRegistry_in_Java_ME.

    Although I can wake my application up with the network(push with socket) or sms, I can't have either a dialog(prompt dialog when notification occurs) with an custom message nor set icon on status bar.
    I would point you specifically to this section: PushRegistry#To_determine_if_the_MIDlet_was_invoked_by_an_incoming_message:. It seems to me that this section explains how you can tell if your app was woken using a message - and you said you've already got this working. There doesn't appear to be any way to get the payload, but since you know you were woken by a message you can query your server and ask for the last message. Then you can display it however you like.

    The second part is display. I don't know if there is any way to update the status pane from a Java ME app (though this is possible on Symbian C++). I suspect not. However if you're using LWUIT, then a good place to ask would be the LWUIT project discussion board. However if you can get the message by re-querying the server then why can't you just display a dialog?

    regards
    Hamish

  3. #3
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: notification on nokia S40

    Hello Ronald,

    I am not a Java Me experienced developer (yet) but I believe you need to search for keywords like "push registry j2me".

    Please, take a look at the documentation below and all the good links pointed by Hamish.

    http://www.developer.nokia.com/Resou...lications.html

    Marcelo Barros

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: notification on nokia S40

    Quote Originally Posted by NaPsTeR ScofielD View Post
    Good day!

    I am doing an IM application on S40 using JAVA ME. I would like to know, when the application is closed, how to get notify(prompt a dialog with the message and icon on the status bar) when a new message arrives. I tried with push notification but it doesn't help me, Although I can wake my application up with the network(push with socket) or sms, I can't have either a dialog(prompt dialog when notification occurs) with an custom message nor set icon on status bar.

    I believed it can only work on symbian devices because the app can run in background until when I saw it on whatsapp application for s40, I went through all the s40 api I couldn't make it.

    Can someone have any idea about?

    Thanks

    Ronald TAMBAT
    Developer at HowzIT
    South Africa
    Push Registry via SMS is the only solution for such cases, to launch the midlet on new message - it works on S40, I have tested on Emoze IM client on S40. You can try static pushRegistry on S40.. i.e. via entry in the JAD file..... check the push Registry wiki links provided by Hamish in the thread below... it will work. You may need to setup proper permissions and may sign the app with trusted 3rd party certificates.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Fb notification in nokia c6
    By Devilish0918 in forum General Development Questions
    Replies: 3
    Last Post: 2011-08-02, 06:13
  2. Replies: 1
    Last Post: 2008-03-11, 13:53
  3. m-notification.ind for Nokia Phones
    By prayaag in forum General Messaging
    Replies: 0
    Last Post: 2006-04-06, 11:27
  4. About M-Notification.ind Over Nokia SMS
    By yilaylay in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2004-07-28, 08:21

Posting Permissions

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