×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    Finland
    Posts
    109

    PushRegistery & ConnectionNotFoundException

    Hi guys,

    I want to create a midlet (S40 6th edition) that can be started from another midlet.
    But I cannot figure out which connector should be used for PushRegistry registration.

    I have code which tries to initialize PushRegistry dynamically. But when I call:
    PushRegistry.registerConnection(url, midletName, "*");
    ConnectionNotFoundException is allways thrown.

    I have tried to use following url's:
    datagram://ortNumber
    socket://ortNumber
    and they both give same result

    Only url that works is sms://ortNumber, but I cannot use SMS to start my midlet

    Is there anyway to get around this problem (like other url's I should use)?

    Thanks
    Last edited by jascco; 2011-10-07 at 15:44.

  2. #2
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: PushRegistery & ConnectionNotFoundException

    Which device have you tested this on? Does the device have network connection?
    Do you have all the necessary permissions listed in the JAD file?
    Can you provide the exact URLs you have tested this with?

    Hartti

  3. #3
    Registered User
    Join Date
    Dec 2005
    Location
    Finland
    Posts
    109

    Re: PushRegistery & ConnectionNotFoundException

    Thanks for the reply Hartti,

    I'm testing on C3-00.
    Device has both 3G and WIFI networks connections available, and both seem to work (when using browser)
    I have to try to add network permission, but I have javax.microedition.io.PushRegistry in JAD-file.
    Should it throw SecurityException if permissions are missing?

    I have tested with following URLs:
    "socket://:5000" -> ConnectionNotFoundException
    "datagram://:5000" ->ConnectionNotFoundException
    "sms://:5000" -> this works

    I have tried someother ports but allways same result

  4. #4
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: PushRegistery & ConnectionNotFoundException

    This Exception means
    "ConnectionNotFoundException - if the runtime system does not support push delivery for the requested connection protocol"

    I do not remember reading that Series 40 would not support network-related push connections, so maybe the network access is not properly set up for Java MIDlets. Could you try if network connection works for a simple HTTP Connection MIDlet (there are plenty of examples around....

    Hartti

  5. #5
    Registered User
    Join Date
    Dec 2005
    Location
    Finland
    Posts
    109

    Thumbs up Re: PushRegistery & ConnectionNotFoundException

    Hi,

    I tried simple HTTP Midlet and it works correctly.

    I also did some tests with my N8 and my MIDlet works correctly in it. When I create network connection from another midlet my pushregistery midlet is started.

    Could there be only some ports that work on S40 devices? (I did some test but any of random port from range 5 - 70000 didn't work)

    Now I have also following permissions in my JAD-file:
    MIDlet-Permissions: javax.microedition.io.PushRegistry,javax.microedition.io.Connector.http,javax.microedition.io.Connector.https,javax.microedition.io.Connector.datagram,javax.microedition.io.Connector.socket

    Here's my code:
    Code:
     
    try {
          String dport = "datagram://:5";
          PushRegistry.registerConnection(dport, myName, "*");
    
          Alert alert = new Alert("REG OK", myName+":"+dport, null, AlertType.WARNING);
          alert.setTimeout(Alert.FOREVER);
          display.setCurrent(alert);
    	   			
       } catch (Exception ioe) 
       {
           Alert alert = new Alert("Error", ioe.toString(), null, AlertType.WARNING);
           alert.setTimeout(Alert.FOREVER);
           display.setCurrent(alert);
        }
    Any ideas ? =)

  6. #6
    Regular Contributor
    Join Date
    Mar 2011
    Location
    Pune,Maharashtra,India
    Posts
    92

    Re: PushRegistery & ConnectionNotFoundException

    Quote Originally Posted by jascco View Post
    Hi guys,

    I want to create a midlet (S40 6th edition) that can be started from another midlet.
    But I cannot figure out which connector should be used for PushRegistry registration.

    I have code which tries to initialize PushRegistry dynamically. But when I call:
    PushRegistry.registerConnection(url, midletName, "*");
    ConnectionNotFoundException is allways thrown.

    I have tried to use following url's:
    datagram://ortNumber
    socket://ortNumber
    and they both give same result

    Only url that works is sms://ortNumber, but I cannot use SMS to start my midlet

    Is there anyway to get around this problem (like other url's I should use)?

    Thanks
    Hi,jascco
    For doing your task,have you sign your MIDlet?
    if yes then it should have signed by operator or manufacturer domain.

  7. #7
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: PushRegistery & ConnectionNotFoundException

    Hello jascco,

    the list of supported protocols for Push Registry in Series 40 include the following:

    -Bluetooth RFCOMM
    -Bluetooth L2CAP
    -SMS
    -MMS

    Unfortunately the other protocols are not supported.

    This information can be found from the Java Developer's Library:

    Java Developer's Library 3.10 > Developer's guides > Networking > Networking in Java ME

    http://library.developer.nokia.com/i...505254584.html

    Regards,
    r2j7
    Last edited by r2j7; 2011-10-11 at 08:05.
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  8. #8
    Registered User
    Join Date
    Dec 2005
    Location
    Finland
    Posts
    109

    Re: PushRegistery & ConnectionNotFoundException

    Thanks r2j7,

    That's what I was looking for, just couldn't find it =)

    According to Developer's Library it applies to JRT 1.0.0, do all S40 devices come with JRT 1.0.0
    or is there any S40 devices that could support newer JRT (which could have some other PushRegistry methos available)?

    pradip7: I have not signed my midlet, but according to r2j7's post it wouldnät help =)?

  9. #9
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: PushRegistery & ConnectionNotFoundException

    Hello jascco,

    you can find all the devices which support Java Runtime 1.0.0 for Series 40 by using the device search tool online by Nokia Developer web site: http://www.developer.nokia.com/Devic...vaRuntime1.0.0

    Regarding the latest features on Java Runtime 1.0.0 for Series 40, you can find more information from Java Developer's Library:

    Java Developer's Library 3.10 > Introduction to Java ME > New features in Java Runtime 1.0.0 for Series 40

    http://library.developer.nokia.com/i...5CC29F94F.html


    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  10. #10
    Registered User
    Join Date
    Dec 2005
    Location
    Finland
    Posts
    109

    Re: PushRegistery & ConnectionNotFoundException

    Thanks again r2j7,

    I allways forget that Nokia has created these great web pages for us =)

    I'm going with solution found on link:
    http://library.developer.nokia.com/i...5CC29F94F.html

    -> S40 devices should support Content Handler API, which might solve my case

  11. #11
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: PushRegistery & ConnectionNotFoundException

    Thanks r2j7,

    Funny that I went through the Nokia Developer Library materials looking for this information, but I was not able to find the note either. Odd..

    Hartti

  12. #12
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105

    Re: PushRegistery & ConnectionNotFoundException

    Quote Originally Posted by r2j7 View Post
    the list of supported protocols for Push Registry in Series 40 include the following:

    -Bluetooth RFCOMM
    -Bluetooth L2CAP
    -SMS
    -MMS
    And CBS and Bluetooth OBEX. Nevertheless jascco, this is not the answer you where looking for. In Series 40, there is a private API to call other MIDlets, however, because it is private and signing is involved, I do not know anything else.

Similar Threads

  1. PushRegistery Question!
    By jackofall in forum Mobile Java General
    Replies: 3
    Last Post: 2009-04-29, 12:44
  2. ConnectionNotFoundException
    By quantim5 in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2008-08-09, 20:00
  3. ConnectionNotFoundException
    By p_joon in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2007-11-19, 15:52
  4. ConnectionNotFoundException
    By jini_1 in forum Mobile Java General
    Replies: 6
    Last Post: 2007-06-07, 18:45
  5. ConnectionNotFoundException
    By jorgenaasland in forum Mobile Java General
    Replies: 1
    Last Post: 2002-11-21, 07:11

Posting Permissions

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