j2me application to send file via bluetooth
Hi!
I would like to create an application in J2ME which allows to transfer files between two mobile terminals via bluetooth....
Does anybody knows more about? Is it possible? where can i start?
do you have some code to start with?
I'm using netbeans 4.0
thank you all
J_p
Problem in receiving data in mobile sent from pc
Hi!all..
I am doing the same thing...in my project actually i want to transfer data from pc to mbile back and forth..using bluetooth
In that i am able to transfer data from mobile to pdesktop pc successfully..
in my application desktop pc is server and mobile j2me application is client....
Now i am able to connect both mobile and pc and as i have told u already i am to send data from mobile to pc and pc receives them and prints them but when i am trying reverse thing my mobile receives data randomly i.e. it may happen that mobile doesn't receive data at all or mobile receives all the data...and in that ratio of not receiving data in mobile at alll is more than receiving successfully....
I have also tried to communicate between two mobiles in which one is server and other mobile is client using same code to receive and send data....they both communicate well successfully back and forth...
but problem is only between pc and mobile....
Another thing i have also tried to make my mobile server and pc as client but in that case when in service search completed method when pc client tries to connect to mobile server which is already successfully in waiting mode the pc throws an exception "java.io.exception : Connection failed"
So i mnot getting the reason why it is happening....
pc server can receive data from mobile client successfully and can slao send data successfully but mobile client doesn't receives or some times receives....
mobile server and mobile client both successfully communicate with each other successfully.......
And mobile server and pc client case mobile server goes into waiting mode but client is not able to connect with server throws and io exception: "Connectionfailed"
So is there any one who has same problem as mine???????
or is there any one who can tell me the reason why it is not receiving data or why connection failed exception is coming?????????
Or is there any one who has done successful communication between pc server and mobile client???????????
if some one is there then plz help me because in my project to transfer data back and forth between mobile and pc is necessary....in any case...
Help from any one would be appreciated greatly..............
Problem in receiving data in mobile sent from pc via bluetooth
hi!
now i m stuck up with new problem...
Now i am able to receive data that's only string in mobile 5300 but there is problem in that...
It is like when it receives data the mobile client show that it is disconnected automatically from the connection..
So after that i am not able to send that data to pc server as before i do anything after service search it first promplt me that it is disconnected...
So i can read the data only once and it shows the exception that"java.io.exception:InputStream is closed"
And after that when try to send that data to pc it shows me exception "Symbian Os error -36" is. disconnected..
As it is obviouse that it is disconnected as it promplts me first...
But the odd behaviour is here that when i m trying to read int it show that available bytes are 4i.e.for integer data type but it reads 0 instead integer pc has send to monile...So in this case it won't automatically get disconnected...So if i send data to pc the application will lwt me to send as many time as i want...
So the observation of this behaviour is that when mobile receives string it reads it successfully and display it perfectly...and get automatically disconnected ...but when it read any data type except string it show the data in stream while checking with method is.available() according to data type but it doesn't read that data from stream so displaying nothing and in this case it won't get disconnected automatically...so i m able to send data to pc..
Is there any body who has same problem ????
Is there any body who can help me to sort out my this problem...????
Any help from any one will be appreciated..
Thanks....
how to make a midlet that sends text file from phone to another phone
Good Day! :)
I am currently doing a project using J2ME. I should make a Midlet for a server which is a Nokia Series 60 phone and another Midlet for the client which is also a Nokia Series 60 phone. As of now, the server Midlet can send image files to client. what am i supposed to do is to add a function that can also send TEXT FILE. sending of files is through bluetooth.
Please help me regarding this.
Thanks in advance.
i need to know how u are able to send messages
hello everyone...
i just read all this conversation and i too is interested in doin a similar project as my final tear project...
i wanted to know if any 1 of u cn tell me how can i build a application which can send messages to a mobile phone from a pc via bluetooth or viceversa....
i want 2 know from the beginning....
thanx....
transfering messages via bluetooth using j2me
Hello,
I am a newbie for java. My project is to transfer messages
between a laptop and mobiles (back and forth) via bluetooth
rather than using SMS service.
Now I am using Jcreator and Java Wireless Toolkit2.5.2 and
trying on a simple Hello World application. It has been
successfully worked by the following code:
[Code]
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class First extends MIDlet {
private boolean paused;
private Display myDisplay;
private HelloCanvas myCanvas;
public First() {
paused = false;
}
public void startApp() throws MIDletStateChangeException {
if (paused) {
myCanvas.repaint();
}
else {
myDisplay = Display.getDisplay(this);
myCanvas = new HelloCanvas();
myDisplay.setCurrent(myCanvas);
}
}
public void pauseApp(){
paused = true;
notifyPaused();
}
public void destroyApp(boolean unconditional){
notifyDestroyed();
}
class HelloCanvas extends Canvas {
public void paint(Graphics g){
int ctr;
int y_loc = 0;
g.setColor(0x0FFFFFF);
g.fillRect(0,0,getWidth(), getHeight());
g.setColor(0);
if (paused){
paused = false;
g.drawString("Welcome Back",0,0,Graphics.TOP | Graphics.LEFT);
}
else {
for (ctr = 1; ctr<=6; ctr++){
g.drawString("Hello World",0,y_loc,Graphics.TOP | Graphics.LEFT);
y_loc+=25;
}
}
}
}
}
[\Code]
Could you please give me some example code so that I can
do the project further?
Any help would be highly appreciated.
Regards
Transfer file from mobile to pc or vice versa
Hi. I want to transfer data from mobile (phone,sim,memory card)memory to pc.what is the procedure and code of that.plz any body can help me
Send files using OBEX Bluetooth Java
I found an excelent Example of how connect PC and J2ME Mobile phone in this blog.
http://mobile-programming-and-games....hone-over.html
and include code source for testing!...