aspose file tools*
The moose likes Java Micro Edition and the fly likes Push Registry Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Push Registry " Watch "Push Registry " New topic
Author

Push Registry

Hashim siddiqui
Greenhorn

Joined: Mar 15, 2004
Posts: 17
Hi!
i want to write server side code that will invoke the j2me application on my mobile 6600. The application is expecting a socket connection at a fixed port lets say 5555.
My question is what will hte exact url from server to invoket the application on mobile.
my mobile no is 07774013218 and the country code is 44.
could any one please tell me the exact string to be used for this socket connection.
Thanks in advance.

truly,
siddiqui
www.devmobile.net


Siddiqui,<br />Smart Solutions,<br />SCJP,SCJD,SCMAD
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

That depends on how you register your Connection on the mobile device. Did you register it with a specific address and port, or is it created dynamically. If it is created dynamically, then you need to have the J2ME application create the Connection, call getPort, getAddress to get that information and then publish it to a web server, so that others can find out that information.

You can read the Push Registry API Specification and some special White Papers at sun.java.com on how to do this.

Good Luck

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Ryan Chai
Greenhorn

Joined: Aug 26, 2004
Posts: 6
i agree with mark. since u r probably registering it dynamically(i doubt ur telco will give u a fixed ip unless with a fee), u'll need to publish it to the server.

mark, by using the getLocalAddress(), can it really get thr phone's ip. i've read in forums that it just return 127.0.1. even if it is not on emulator but on real device. i could not try itcaouse i don own a midp2.0 phone.

i am tryin to create a midlet that awaken when activity is detected on port xxx(without sms). i wrote a midlet on emulator thta listens to port xxx. then i opened up telnet and just 'open' port xxx(doing nothing else), and true enough the midlet awakens cause it detect activitiy on port xxx.

so my theory:
1) hand phone download jar,jad file via OTA also registering ip address n phone number to server side app
2) new info available
3) server side app just opened port xxx(doing nothing else) by socket conn include the phone ip that it received
4)midlet detects activity and awaken, then user can download info fr server.

is thispossible??
thanks in advance
 
 
subject: Push Registry