• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

bluetooth streaming through anroid os cell phone

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
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]]
Filename: btinit.java
File size: 7 Kbytes
Filename: BTinitservice.java
File size: 15 Kbytes
Filename: Devicelistactivity.java
File size: 3 Kbytes
Filename: Tcpconnect.java
File size: 2 Kbytes
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yumna, welcome to Java Ranch!

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...
 
yumna tariq
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot.

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??

Kindly help
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"ryt"? UseRealWords

..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.

If you are not using Eclipse, you can still run DDMS from the command line, this should help:
http://developer.android.com/guide/developing/debugging/ddms.html
 
Yes, of course, and I accept that blame. In fact, i covet that blame. As does this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic