×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    13

    PushRegistry information

    Hello,

    we can know if a MIDlet is activate by an icomming connection(Socket or Datagramm) but can know if a MIDlet is activate bye time alrame or by a SMS connection

    Thank

  2. #2
    Registered User
    Join Date
    Feb 2009
    Posts
    13

    Re: PushRegistry information

    Please give a response

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

    Thumbs up Re: PushRegistry information

    Quote Originally Posted by heutchBrun View Post
    Hello,

    we can know if a MIDlet is activate by an icomming connection(Socket or Datagramm) but can know if a MIDlet is activate bye time alrame or by a SMS connection

    Thank
    Activate Midlet bye time alarm.....
    /*register an alarm*/
    public void setAlarm() {
    try {
    Date d = new Date();
    String classname = "Midlet"
    long previousAlarmTime = PushRegistry.registerAlarm(
    classname,d.getTime() + MILLISECONDS_TILL_ALARM);
    } catch (Exception e) {
    }
    }


    Also Please checkout the link to activate the midlet thorugh sms..

    http://wiki.forum.nokia.com/index.ph...try_in_Java_ME


    If Im wrong and misunderstand ur need then please make me correct and reply with full explanation about ur requirement.
    thanks,
    jitu_goldie..

    KEEP TRYING..

  4. #4
    Registered User
    Join Date
    Feb 2009
    Posts
    13

    Question Re: PushRegistry information

    Yes you misunderstood my question . I want to get information about the orgin of a MID let activation . If the orgin is a network connection we can get this information using the code above

    Code:
    /**
    *  Determine if activated due to inbound connection and
    *  if so dispatch a PushProcessor to handle incoming
    *  connection(s). @return true if MIDlet was activated
    *  due to inbound connection, false otherwise
    */
    private boolean handlePushActivation() {
        //  Discover if there are pending push inbound
        //  connections and if so, dispatch a
        //  PushProcessor for each one.
        String[] connections =
    	PushRegistry.listConnections(true);
        if (connections != null && connections.length > 0) {
    	for (int i=0; i < connections.length; i++) {
    	    PushProcessor pp = new
    		PushProcessor(connections[i]);
    	}
    	return(true);
        }
        return(false);
    }
    (ref to this http://developers.sun.com/mobility/m...icles/pushreg/)


    So my question is that:how could i determine that a MIDlet was activate by Time Alarm and not how to register for time activation

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

    Thumbs up Re: PushRegistry information

    register midlet for activation after fix time interval..

    PushRegistry.registerAlarm(""+midlet,TIME in MILLISECONDS);
    thanks,
    jitu_goldie..

    KEEP TRYING..

  6. #6
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: PushRegistry information

    if im not mistaken if u call the resiterAlarm method the last time for a registered alarm is returned...
    if that time has passed (and alarm was set for that time) then I guess u might conclude that it was the alarm to start it up, especially if u get the time right away when midelt starts and then compare it to last known registry alarm...

Similar Threads

  1. SMS Message associated information?
    By appdeveloper in forum General Messaging
    Replies: 2
    Last Post: 2009-08-18, 05:51
  2. Replies: 7
    Last Post: 2009-01-10, 16:58
  3. Information from the sis file?
    By mayankkedia in forum Symbian
    Replies: 7
    Last Post: 2007-07-11, 11:16
  4. Prototype SDK 2.0 setup problem
    By jackmcardle in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2007-01-09, 16:21
  5. Can't get network information...!!!
    By patrickfrei in forum Symbian
    Replies: 2
    Last Post: 2006-11-28, 09:36

Posting Permissions

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