×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    88

    Basic push registry

    hi,
    how can i implement push registry ?
    can anyone provide some sample code ?
    Any help will be greatly appreciated

  2. #2
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    193

    Re: Basic push registry

    Hello litlleson,

    here is a thread which i started yesterday.
    hopefully help you especially a wiki link.
    http://discussion.forum.nokia.com/fo...d.php?t=166308

  3. #3
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    88

    Re: Basic push registry

    hi,
    i tried that link out..
    it is waiting for an sms to a port 5000..from where will i send the sms ?
    will push registry work in NetBeans6.0 ?
    have you got the result..?
    any help will be greatly appreciated

  4. #4
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    193

    Re: Basic push registry

    Quote Originally Posted by littleson View Post
    hi,
    i tried that link out..
    it is waiting for an sms to a port 5000..from where will i send the sms ?
    will push registry work in NetBeans6.0 ?
    have you got the result..?
    any help will be greatly appreciated
    Netbeans is a tool you should test your app at mobile device .
    In netbeans you didn't get any error.
    There are many code links available at google you can search.
    http://www.java-tips.org/java-me-tip...-device-4.html

    i found this .
    http://wiki.answers.com/Q/How_do_you...g_SMS_messages
    other threads.
    http://discussion.forum.nokia.com/fo...ad.php?t=74214
    Attached Files Attached Files

  5. #5
    Super Contributor
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: Basic push registry

    Please checkout this link regarding PushRegistry
    thanks,
    jitu_goldie..

    KEEP TRYING..

  6. #6
    Regular Contributor
    Join Date
    Apr 2009
    Posts
    89

    Re: Basic push registry

    Hi,

    I have found very good example regarding push registry..
    just go for the given link and download the ping pong application.
    http://developer.sonyericsson.com/si..._java_1201.jsp

    Install this application in your mobile. Through ping you send the SMS and pong receive your send SMS.

    Thanks
    Osam

  7. #7

  8. #8
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    88

    Re: Basic push registry

    hi,
    thanks a lot...
    i will try out..

  9. #9
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    88

    Re: Basic push registry

    hi,
    i want to auto start a midlet after every 10 minutes. So it involves only
    the registerAlarm() isn't it ?. What is the connection url i should give
    to register the midlet as there is no socket or datagram or sms connection?

  10. #10
    Super Contributor
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: Basic push registry

    Quote Originally Posted by littleson View Post
    hi,
    i want to auto start a midlet after every 10 minutes. So it involves only
    the registerAlarm() isn't it ?. What is the connection url i should give
    to register the midlet as there is no socket or datagram or sms connection?
    Well to invoke the midlet after 10 minutes u need only PushRegistry.registerAlarm().
    What u have to do is just set the push registry, invoke the midlet and then set pushregistry again and get exit from the midlet.


    like :
    midlet A:

    // work has to be done ..

    // set PushRegistry to the same midlet A..
    exit
    thanks,
    jitu_goldie..

    KEEP TRYING..

  11. #11
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    88

    Re: Basic push registry

    hi,
    i am putting my code here..it does not work...
    Code:
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import java.util.Date;
    
    
    public class OwnPushRegistry extends MIDlet 
    {
        private Form frm;
        private Display disp;
        private Date now = new Date();
        public void startApp() 
        {
          frm = new Form("Form");
          disp = Display.getDisplay(this);
          disp.setCurrent(frm);
          try
          {
          PushRegistry.registerAlarm("OwnPushRegistry",now.getTime() + (10*60*1000));
          }
          catch ( java.lang.ClassNotFoundException cnf )
          {
    	System.out.println( "OwnPushRegistry: Class not Found" );
          } 
          catch ( javax.microedition.io.ConnectionNotFoundException connnf ) 
          {
    	System.out.println( "OwnPushRegistry: Connection Not Found" );
          }
        }
        
        public void pauseApp()
        {
            
        }
        
        public void destroyApp(boolean unconditional) 
        {
            
        }
        
    }
    Any help will be greatly appreciated...

  12. #12
    Super Contributor
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: Basic push registry

    Did u check that what time are u giving as a parameter to invoke the midlet..
    Just print the time u have given to invoke the midlet. It was passed away time. PushRegistry can work for future time not for past time..

    Code:
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import java.util.Date;
    
    
    public class OwnPushRegistry extends MIDlet 
    {
        private Form frm;
        private Display disp;
        private long now = System.currentTimeMillis();
        public void startApp() 
        {
          frm = new Form("Form");
          disp = Display.getDisplay(this);
          disp.setCurrent(frm);
          try
          {
              
              
          PushRegistry.registerAlarm("OwnPushRegistry",now + (10*60*1000));
          }
          catch ( java.lang.ClassNotFoundException cnf )
          {
    	System.out.println( "OwnPushRegistry: Class not Found" );
          } 
          catch ( javax.microedition.io.ConnectionNotFoundException connnf ) 
          {
    	System.out.println( "OwnPushRegistry: Connection Not Found" );
          }
        }
        
        public void pauseApp()
        {
            
        }
        
        public void destroyApp(boolean unconditional) 
        {
            
        }
        
    }
    just try this code with some modifications.
    Also take care that some of the mobiles have a time difference issue of 30 minutes.
    Some of the examples of those devices are N73,E65 etc.
    thanks,
    jitu_goldie..

    KEEP TRYING..

  13. #13
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    88

    Re: Basic push registry

    hi,
    thanks for the correction...
    i tried it..but i cannot install the JAR file..
    i get an 'Invalid JAR file' error..
    i use Nokia E65..

  14. #14
    Super Contributor
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Thumbs up Re: Basic push registry

    Quote Originally Posted by littleson View Post
    hi,
    thanks for the correction...
    i tried it..but i cannot install the JAR file..
    i get an 'Invalid JAR file' error..
    i use Nokia E65..
    Describe ur JAD attributes :
    Also take care with E65. suppose If you are setting the push registry for 10.30 then midlet will invoke at 11.00. There is an issue with this device of 30 minutes.
    thanks,
    jitu_goldie..

    KEEP TRYING..

  15. #15
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    88

    Re: Basic push registry

    hi,
    thanks for your help, given below is the JAD attribute entries
    MIDlet-1: OwnPushRegistry, , OwnPushRegistry
    MIDlet-Jar-Size: 1400
    MIDlet-Jar-URL: OwnPushRegistry.jar
    MIDlet-Name: OwnPushRegistry
    MIDlet-Push-1: ,OwnPushRegistry,*
    MIDlet-Vendor: Vendor
    MIDlet-Version: 1.0
    MicroEdition-Configuration: CLDC-1.1
    MicroEdition-Profile: MIDP-2.0

Similar Threads

  1. MIDLET not getting started automatically by push registry
    By ayan_sen in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2011-07-01, 12:37
  2. push registry and sms problem with nokia phones only
    By dr_kmk4 in forum Mobile Java General
    Replies: 3
    Last Post: 2007-12-09, 08:13
  3. Push Registry Problem..SMS Demo
    By dhamodharan in forum Mobile Java General
    Replies: 2
    Last Post: 2005-11-24, 00:32
  4. Push registry with datagram or socket
    By kakgul in forum Mobile Java General
    Replies: 3
    Last Post: 2004-03-31, 14:57
  5. MIDP 2.0 Push Registry and WAP push
    By chandu_bgm in forum Mobile Java General
    Replies: 2
    Last Post: 2003-09-22, 06:54

Posting Permissions

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