Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem on Java Bluetooth programming

807607Jan 6 2007 — edited Jan 6 2007
I'm a newbie in J2ME, I've tried to build a project on bluetooth communication between PC and mobile by modifying a bluetooth project named BlueChat (and also BlueChatPCGui). Its codes were downloaded from:
http://sourceforge.net/project/showfiles.php?group_id=176926

the BlueChatPCGui.zip one...... .

However, I want to achieve a functionality that automatically send back Strings to the mobile phone, by amending the source codes in BlueChatPCGui.

What I mean is that in the ChatMain.java inside BlueChatPCGui, when a message sent by the mobile was received by the PC, then the message will be shown immediately in the PC Chat Console. But how can I make use of this message to automatically send back some specific message to the mobile? For example, if the Mobile send a "ABC" message to PC, then PC will AUTOMATICALLY send back "You just sent ABC" to the mobile without typing in the PC interface and click the "Send" button. I've spent a lot of time by understanding the codes in ChatMain.java and the ChatMessageTxn.java (The PC GUI ) and still get no idea on automatically sent back messages. I really don't know how to automatically trigger the sendString function in NetLayer.java when a message is received by the PC. Can anyone tell me some actual modifications of the source codes so that it can be achieved?

I'm so sorry for such long question but it's really important to me, since it's about final year project. And please help!!!!!

Thanks very much!!


Gary
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 3 2007
Added on Jan 6 2007
1 comment
128 views