×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    6

    PushRegistry.registerAlarm prolem on N80 and Nokia 6630

    I installed my jar on N80(series 60 3rd edition) where Midlet A calls MidletB with PushRegistry.registerAlarm() method.This works fine on the S60 emulator but on the device although it asks me for the permission to launch the second midlet but it does'nt do anything after that.
    Manifest-Version: 1.0


    My manifest file included in the jar file is
    MIDlet-Name: MyMIDlet
    MIDlet-Version: 0.0.1
    MIDlet-Vendor: MyCompany
    MicroEdition-Profile: MIDP-2.0
    MicroEdition-Configuration: CLDC-1.1
    MIDlet-Permissions: javax.microedition.io.PushRegistry
    MIDlet-1: AlarmMidlet, , AlarmMidlet
    MIDlet-2: HelloMidlet1, , HelloMidlet1


    Is it true that permissions only work for signed midlets?If so ,then that could be the issue but what is of concern to me is it asks for the permission to launch the midlet and when i say "YES"it just does'nt do anything...it dont even throw any exception...Will signing the midlet suite solve my problem..Please any suggestions are helpful

    Thanks

  2. #2
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: PushRegistry.registerAlarm prolem on N80 and Nokia 6630

    Hi inaik,

    >>Is it true that permissions only work for signed midlets

    yes permissions are useful only for signed midlets.

    did u try this example
    http://developers.sun.com/techtopics.../pushregistry/


    Regards,
    Wang

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    6

    Re: PushRegistry.registerAlarm prolem on N80 and Nokia 6630

    Thanks Wang

    I did try this example as well.Everything works fine on the emulator but not on the device.

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    How does your .registerAlarm(…) parameters look like?

  5. #5
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: PushRegistry.registerAlarm prolem on N80 and Nokia 6630

    Hi lnaik,

    Your post is a little confuse. You talk about MIDlets A and B, then about first and second. It would be better to have a common naming scheme for your MIDlets as it would help us figure out things.

    Could you please elaborate a little and also provide more Java code as Wang requested?

    I hope we'll be able to help you

    BR,

    Juarez Junior

  6. #6
    Registered User
    Join Date
    May 2006
    Posts
    6

    Re: PushRegistry.registerAlarm prolem on N80 and Nokia 6630

    Hi,

    Sorry for the delay..
    We have 2 midlets A and B...Midlet A wants to invoke Midlet B by registering an alarm.Below is the code for Midlet A ...AlarmMidlet is my Midlet B...



    protected void startApp( ) throws MIDletStateChangeException
    {
    t = new TextBox("Hello MIDlet", "Test string", 256, 0);
    t.addCommand(exitCommand);
    t.setCommandListener(this);
    System.out.println( "PushMIDlet:startApp()" );
    try{

    long previous;
    display.setCurrent(t);
    String str = AlarmMidlet.class.getName();
    Date now = new Date();
    previous = PushRegistry.registerAlarm(str,now.getTime());
    } catch(java.lang.ClassNotFoundException cnf ) {
    Sstem.out.println( "PushMIDlet: Class Not Found" );
    }catch(javax.microedition.io.ConnectionNotFoundException connnf ) {
    System.out.println( "PushMIDlet: Connection Not Found" );
    }

  7. #7
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: PushRegistry.registerAlarm prolem on N80 and Nokia 6630

    Hi lnaik,

    Do you want prompt activation? I noticed that you've set your activation time to right away (now)...

    previous = PushRegistry.registerAlarm(str,now.getTime());

    Isn't better to have a time in future? What do you need?

    PushRegistry.registerAlarm(this.getClass().getName(), now.getTime + (1000 * 60 * 60));

    BR,

    Juarez Junior

  8. #8
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105
    Do you want to invoke MIDlet B from MIDlet A of your MIDlet suite? Rather consider to create one MIDlet which does both parts…

  9. #9
    Registered User
    Join Date
    May 2006
    Posts
    6

    Re: PushRegistry.registerAlarm prolem on N80 and Nokia 6630

    Hi,
    Yes we want midlet A to call midlet B and we want to launch Midlet B immediately.
    This code works fine on emulator (S60 3rd edition emulator) ..but on the device it does'nt... My question is whether its only becoz of the fact that my midlets are not signed(since permissions only work for signed midlets) or there could be any other reason..
    Thanks

Similar Threads

  1. Nokia N80 / J2ME problems
    By o66183 in forum Mobile Java General
    Replies: 18
    Last Post: 2008-05-09, 12:18
  2. Making SIP call from Nokia N80 over WiFi to PC
    By jkorycki in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2007-02-01, 10:01
  3. Replies: 6
    Last Post: 2006-07-28, 07:03
  4. Nokia N80 crashing all the time now?
    By steffi1 in forum General Development Questions
    Replies: 4
    Last Post: 2006-05-16, 23: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
  •  
×