| Reply | « Previous Thread | Next Thread » |
|
I have created a J2ME client on a mobile phone and a server on a laptop. Connection has been established between phone and laptop through Bluetooth. Can anyone provide me with solutions on how to write objects over a stream? I am new in this. MIDP api does not have an ObjectOuputStream class unlike J2SE. So far i can only send primitive data types and String types.
For example, I have created a new class called Cat Cat cat = new Cat(); I want to send this cat object from my mobile phone to my laptop or vice versa. is this possible? can anyone show me how to do so? |
|
I don't think it is possible. Convert your object to byte array and then send it.
|
|
hi weiru85,
may i know how u done this , coz i m also doing same thing send and receive object via j2me , but i m using Netbeans ide for that , plz help me Thank You, |
| markwilson |
| View Public Profile |
| Find all posts by markwilson |
|
Quote:
i believe that you are new in this too. I recommend you to read up on socket communication in J2ME. For a self-created object, i write each field of an object to the output stream and read in back on the input stream on the other end and instantiate the object on the receiver's end. For a beginner like me, thats how i do it. I have no experience in Class Loading, which is possible but not recommeded for Java in mobile devices as it breaches security. Furthermore, There is not ObjectOutputStream class in MIDP to convert your object to bytes. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| How To Make The S60 Emulator See My USB Bluetooth Dongle ? | Mo7ammed_01 | Symbian Tools & SDKs | 1 | 2006-07-25 01:14 |
| best bluetooth dongle+ bluetooth programming | ali_hammad | Bluetooth Technology | 3 | 2006-06-12 21:12 |
| Successfully Connected Using Bluetooth with Pc Suite | zrilo | Bluetooth Technology | 0 | 2006-04-09 05:21 |
| Nokia 8910 not working with USB Bluetooth Cards | olivieradler | General Discussion | 0 | 2005-10-05 11:49 |
| Bluetooth statuspane icon | antijn | Bluetooth Technology | 2 | 2004-10-30 10:23 |