Skip to main content

sending SMS to server -> Wireless Messaging API (WMA)

1 reply [Last post]
Joined: 2009-08-16
Points: 0

Hello :-)!

In general I want to create application for CLDC (with the use of MIDlet). (And maybe later to try the same with CDC). I want my application to create some data based on communication with the user of mobile phone and then to send little text file to the application on server computer.

I found that there exists such a thing as WMA - Wireless Messaging API. I downloaded examplary .jar & .jad files (with sources and documentation):
and copied those files to Sony Ericsson K750i. I installed the application, run it, it asked me whether I want to allow this application to receive SMS, I answered yes and... nothing else happened and the application exited. I run this application once more, it doesn't do anything at all and exits.

I tried to analyse the code but it didn't help me to notice what is wrong with the program.

In init() there is initialization of what and where will be sent (port number and message). (Function init is called in startApp so in my application I will need to call it in the other place in the code and I will take the content of the message from the other place that jar or jad files, as in this examplary application).

StartApp() calls init(), it listens to incoming messages, creates commend, label etc. (Probably I need to erase from this example code responsible for listening to incoming messages so that this examplary application will work on my Sony Ericsson?).

CommandAction(c,d) sends text or binary message (depending on choice in the field cg.setSelectedIndex) or exits the application for "exit".

ItemStateChanged() changes from binary to text mode and vice versa.

SendBinaryMessage(connection,destAddress,Body) and sendTextMessage(...) send the message.

I don't know what are those "private static final String".


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-06-18
Points: 0


what is your actual question? If your idea is possible to implement?