But functionnaly, I believe a Wap Push SMS would be much better (eg something like "Your friend sent you something" and an attached wap link). I read that a binary SMS could do that (am I right ?), so I used the BinaryMessage class. The problem must be with the format. I read many things on the web, and I tried many data formats. I believe the problem must be with headers and footers.
For instance, I tried to send the following data (as a byte array) with a BinaryMessage, but I just doesn't work though I found the data in a reference [wap-167-Service Indication]:
I guess my words were not clear, but for instance when I said I put 0A as a hex-coded byte, I meant I put the decimal value 10 (=0x0A), and when I said I put 'You' as char-coded bytes, I meant I put the decimal values 89, 111 and 117.
The data are in a byte array, and I'm only talking about bytes, not strings.
I suppose you meant something like "You must use a raw byte array, not strings". Is that correct? Anyway the BinaryMessage.setPayloadData needs a byte array.
Unfortunately the JSR-120 doesn't allow you to you use ports 2948 and 2949 for security reasons (and a SecurityException is thrown). I tried ports 4035 and 4036, but it doesn't seam to reach the receiver.
So I'm afraid the final words may be: it's not possible to send Wap Push SMS's from a MIDlet - but if someone can prove me I'm wrong, I'll be very humble and accept all solutions ;)
...i think because WAP PUSH is a standard for sending hyperlinks, whereas putting the text of a link into an SMS relies on the receiver's SMS viewer interpreting the link text to make it 'active' - i.e. on many handsets the user can't just click the link, they can only see its text.
that said, i'm sure support for links in SMS body text is ever-improving.