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.
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.
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.