| Reply | « Previous Thread | Next Thread » |
|
Hi,
I am developing application in J2ME to send files mobile to mobile(via BlueTooth) What, I want to do is, to send a file(.jpg,.gif,or any type) which is stored in the resource folder of the application, for that I have use following code to read file from res folder inputStream=getClass.getResourceAsStream("/abc.gif"); and using OutputStream to write data,no errror in the program ,but when file write is completed it does not show any file on the device where we are writing file. Please give any suggesion . |
| vrushalijadhav |
| View Public Profile |
| Find all posts by vrushalijadhav |
|
If I understood correctly, you want to store data with the MIDlet. For that you need to use eiher RMS or file system. You cannot write files in the resource folders of the MIDlet. You can only read them
Hartti |
|
Join Date: Mar 2008
Posts: 2,161
Location: The Capital of I N D I A
raj_J2ME
Offline
Forum Nokia Champion
|
|
|
Quote:
where you want to write this file,where you are looking for the file after writing. Thanks R a j - The K e r n e l |
|
vrushalijadhav, first of all which UUID do you use for creating the connection (searchServices » getConnectionURL). You should use 0x1105L (OBEX-Push, OPP) for this. OBEX-Push means you have to talk the OBEX protocol, that means you have to open a OBEX connection and then do an OBEX-Put. For more information, please have a look at the javax.obex package.
By the way if you are new to J2ME, MIDlets and Bluetooth, I recommend to start with a book or tutorials rather than code examples as you will have to debug a lot on your own. There are a lot of bugs, tweaks and lessons to be learnt. Bluetooth is complicated. I do not have a good J2ME book at hand right now, however, start with the references of this one for JSR-82 (perhaps your library has its previous edition) or read at least the PDF coming with the specification. If you like to start with tutorials, continue here… |
|
Quote:
I am using two devices to check my output,i.e one device with abc as Friendly name and one with pqr. When I search for devices from device pqr,it is able to find abc,making connection with abc and writing data on abc,so after writing I am looking on my file on device abc. r u got my question? Thanx. |
| vrushalijadhav |
| View Public Profile |
| Find all posts by vrushalijadhav |
|
So:
You have your Java application running on Device A. And Device B, with no Java application. Your application sends a file from Device A to Device B. Device B prompts the user "Device A wants to send somefile. Accept?" and the user selects "yes". File transfer appears to complete. But you cannot find the received file on Device B? There are two possibilities: 1. Your application is not using the correct method. Check out the information that traud has suggested in his reply. 2. You are looking in the wrong place on Device B. Try sending a file using the Device A's own software (for example, selecting a photo and choosing "Send by bluetooth"). See where Device B stores that file. Also: when you send from A to B (without using your application), check the prompts you see on Device B. If, when you use your application, you see different prompts, then you are probably using the wrong method of sending the file. Cheers, Graham. |
| grahamhughes |
| View Public Profile |
| Find all posts by grahamhughes |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Can we call a j2me app from Native C++ app | inguvaseshu | General Symbian C++ | 3 | 2009-01-13 17:42 |
| Changing App Mgr settings from J2ME app | ddbhasin | Mobile Java General | 6 | 2007-09-21 08:18 |
| Can we call a j2me app from Native C++ app | inguvaseshu | Mobile Java General | 1 | 2006-06-16 16:59 |
| J2ME app works fine in the emu but not on the Communicator | schneidc80 | Mobile Java General | 7 | 2005-12-26 16:16 |
| question about running j2me app on Nokia 9500 | liaoyw | Mobile Java General | 0 | 2004-11-22 20:48 |