|
Hi Jignesh, From what I’ve seen in the Push Registry
docs, you can’t use a port that is already in use. So my guess is that your application will
fail to install/startup depending on whether you’re using static or dynamic registration. Enrico From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jignesh Kakkad hi i have question Question this 1234 port is user defined port!!! can i know what port number being used ny operator to send a msg? say for example tht is 404 then can we use tht port in our application? On 11/16/05, Johan
Meyer <[EMAIL PROTECTED]>
wrote: Ok you managed to confuse me. Do you want to know how to send
a SMS from the phone to a specific port on another phone using J2ME? If yes
this example will show you how to do that. So if you want to send a sms to port
1234 on the mobile phone with number +0831234567 you will do the following: String destination = "+0831234567:1234"; Then send it. See the examples mentioned in previous email. BUT If you want to know how to do this from your SMS gateway you
will have to tell me what gateway you are using. I know Saicom is using the
TC45 or soes development for the TC45 so see the TC45_ATC_v0100a.pdf
document. Hope this helps From: [email protected]
[mailto:[email protected]]
On Behalf Of Enrico Goosen
Hi Johan, I'm not interested in how to listen for an SMS on a specific
port. I need to know how to send an SMS to a phone's specific port. My JAD file includes an entry for starting my Midlet when an
SMS arrives on a specific port. So the AMS should startup my Midlet, then it's the Midlets
responsibility to deal with the SMS or not. We have an SMS gateway, but I don't know how to send an SMS
to a msisdn+port? Regards, Enrico From: [email protected]
[mailto:[email protected]]
On Behalf Of Johan Meyer Hello Take a look at the examples in the WTK2.2 installations. They
have got an SMS send examples which shows you how to set the port and the
reveiving sms number. Its basically number:port But the example will explain it better. Some code from the SMSSender.java class: String address =
destinationAddress + ":" + smsPort; MessageConnection
smsconn = null; try {
/** Open the message connection. */
smsconn = (MessageConnection)Connector.open(address);
TextMessage txtmessage =
(TextMessage)smsconn.newMessage(MessageConnection.TEXT_MESSAGE);
txtmessage.setAddress(address);
txtmessage.setPayloadText(messageBox.getString());
smsconn.send(txtmessage); Johan From: [email protected]
[mailto:[email protected]]
On Behalf Of Enrico Goosen Hi Johan (or anyone else in this forum), How can I send an SMS to a specific port on a mobile phone? I've added a Push Registry entry into my JAD file to
autostart my Midlet on receipt of an SMS on port 5003. MIDlet-Push-1: sms://:5003,hello.Main,* In case you're wondering why I'm using a specific port
instead of just specifying the sender's number (msisdn), the Midlet will not
install if I specify the number instead of the port. Regards, Enrico From: [email protected]
[mailto:[email protected]]
On Behalf Of Johan Meyer cool From: [email protected]
[mailto:[email protected]]
On Behalf Of Enrico Goosen Hi Johan, I quickly scanned the following article: http://developers.sun.com/techtopics/mobility/midp/articles/pushreg/ …and it indicates that you can create an inbound connection
based on a static address (as you indicated previously) OR Based on a dynamic address (system assigned address). See
note below. When using a system-assigned address, you must publish this
address so that external systems can connect to your application. If you're
using a Push Registry may not suck after all. Now, I need to see if I can autostart my Midlet so that it
can publish its address to the server, without bothering the user. Laterz, Enrico From: [email protected]
[mailto:[email protected]]
On Behalf Of Johan Meyer Hello Yes by the looks of it that is the case. So a plain socket
connection will be the easiest. Johan From: [email protected]
[mailto:[email protected]]
On Behalf Of Enrico Goosen Hi Johan, Are you saying that Push Registry will only work if your
phone has a static IP address, which it can publish to the Server? That sucks. Guess I'll have to establish a plain old socket connection
from the midlet, and let the server route traffic between connected devices. Thanks, Enrico From: [email protected]
[mailto:[email protected]]
On Behalf Of Johan Meyer Enrico You cannot do Socket PUSH if you do not have the IP address
of the phone. You can contact MTN or Vodacom and chat with them about getting a
static IP for your phone. This will cost you x amount of money and would not
help you much. It would be useless for a chat application, can't expect all
your users to do this. Getting the phones IP can easily be done by making a
connection to the server and the server sending the IP back to the phone. But
remember the IP will change every time you make a new GPRS connection. Plus
this might not be your true IP. Johan From: [email protected]
[mailto:[email protected]]
On Behalf Of Enrico Goosen Hi
all, I'm
thinking of writing a mobile chat application using MIDP 2.0 Push Registry, but
I have a question. If
your Midlet is supposed to startup on receipt of an incoming socket connection,
how will you be able to establish a socket connection with a mobile phone if
you don't know its IP address? Does
the Midlet automatically publish its IP address to the Server, when the user
switches on the phone? OR Must
the user start the Midlet, at which point it publishes its IP address to the
server? How
do you obtain the phone's IP address from within the Midlet? Regards, Enrico Goosen Software Developer SAICOM TECHNOLOGY TEL: +2721 555 0726 FAX: +2721 555 0821 CEL: +2783 305 5676 EMAIL: [EMAIL PROTECTED]
|
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Johan Meyer
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Enrico Goosen
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Johan Meyer
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Enrico Goosen
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Johan Meyer
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Enrico Goosen
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Jignesh Kakkad
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Johan Meyer
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Jignesh Kakkad
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Johan Meyer
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Enrico Goosen
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Enrico Goosen
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Johan Meyer
- [CTJUG Forum] Re: MIDP 2.0 Push Registry Enrico Goosen
