i am working on a bluetooth streaming application in an android based cell phone. the code that i have written should perform the following
1. chk if the bluetooth is available
2. power on the bluetooth
3. scan for bluetooth devices in the area
4.pair with one particular device (say device A)
5. establish connection with the A device
6. start recieving data from the paired device (the connection established is a streaming link so there is continuous data coming from the device A
7. the data is stored in a buffer (1024 bytes)
8. create a tcp connection (establish socket)
9.the data is then transmitted through this tcp socket to a website.
the steps 1 to 4 are being done manually so the code starts from the step 5
the whole communication is real time continuous. the code we have compiled does not have any syntex error in it but when we load the application in our cell phone the application is forced closed
there are four classes in the code where the main function is the btinit.
[[sources moved to attachments]]
Have you looked at the log file in the phone to see if there is a stack trace there? Apps such as LogcatVW can show you the log. Or you can connect the phone to the SDK on your PC and use the SDK tools to examine the logs. That will at least tell you which line of code is causing the issue.
By the way, I moved your sources to attached files - lengthy, unformatted posts tend to scare off potential helpers...
Actually i am new to all this.
So what i am actually doing ryt now is that i give the path of C:\...sdk\platform-tools\ in cmd prompt .....but how do i check the log files and view where the errors could possibly be??? what are the commands??
..but how do i check the log files and view where the errors could possibly be???
I hope that you are using Eclipse to do the dev work. Normally I don't let Eclipse do everything for me, but I found it much easier when starting with Android to let Eclipse do all of the work. So if you are using Eclipse there is a DDMS button in the toolbar - click that an a new perspective opens that shows you the logs and other things.