My task to send sms messages in a cyrillic alphabet.
javax.comm.SerialPort allows to work only with databits_8.
Give me, please, advice.
How can I send sms with russian symbols .
why do you have to use the serial port? The WMA API is designed for sending SMS from a Java ME phone.
My task is to send sms messages from java application.
I connect gsm modem or phone to usb port, create messages from
database and send it to sms list. I can send translit messages ..,
but could not understand, how can I switch to national locking shift table.
Do you know ?
Send the text as UTF-16 via the serial communications protocol to the phone. This send russian characters as two 8 bytes. When you have received the data on the phone, you should use the JSR-120/JSR-205 API to send the message.
I downloaded WTK25, installed it and run the sample code
String addr = "sms://+381234567";
MessageConnection conn = (MessageConnection) Connector.open (addr) ;
TextMessage msg = (TextMessage)conn.newMessage (MessageConnection.TEXT_MESSAGE) ;
msg.setPayloadText ("Hello World!") ;
conn.send (msg) ;
and received an error
after MessageConnection conn = (MessageConnection) Connector.open (addr) ;
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.sun.midp.Configuration.getProperty0(Ljava/lang/String;)Ljava/lang/String;
at com.sun.midp.Configuration.getProperty0(Native Method)
What is wrong ?
PS: ( Johan. I installed SonyEricsson mobile into usb port. )
it seems that the emulator fails to load some native dll. Probably an internal error in the WTK emulator.
To test a MIDlet that sends SMS, you need to start two emulator instances. You also need to set the telephone number on both emulators. The default numbers are: +5550000 and +5550001 respectively.
If you need to send from a device, you need to use on-device-debug found in Sony Ericsson development kit. This way you could start the phone via the USB cable and send an actual SMS from the phone.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.