Results 1 to 1 of 1
- 09-18-2009, 11:14 PM #1Member
- Join Date
- Aug 2009
- Rep Power
sending SMS to server -> Wireless Messaging API (WMA)
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):
[remove asterisks from the link below]
ht * tp://ww * w.forum.nokia.com/info/sw.nokia.com/id/9edb3299-e0f4-449d-a2fd-fa15ddbeed8b/MIDP_2_0_Wireless_Messaging_API_Example_v1_0.zip.h
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".
- By gilbertsavier in forum XMLReplies: 0Last Post: 07-17-2009, 07:35 AM
- By vrk in forum Advanced JavaReplies: 1Last Post: 03-25-2009, 10:59 PM
- By eva in forum NetworkingReplies: 1Last Post: 01-02-2008, 10:34 AM
- By gobinathm in forum New To JavaReplies: 2Last Post: 11-13-2007, 05:12 AM
- By Marcus in forum Advanced JavaReplies: 2Last Post: 07-02-2007, 06:44 AM