Bluetooth stream receiving suggestion - java

i developed application in j2se my data coming from Bluetooth my laptop and GPS both are connected via Bluetooth. GPS send me stream which received by my laptop but i don't know how to this stream come in my jese application. i can show this stream through similar application . sorry for my poor english.
thanking you

You need to use the javax.comm.SerialPort class
Unfortunately, I lost the link to the library itself.

Related

Sending SMS through PC using java via android mobile

I would like to connect my mobile phone in USB debugging mode and then send sms through some java code, so that the text is actually send through my cellphone using my provider sms plan. I am without any idea. I googled but could not get anything useful. Any idea, approach or link to some tutorial would be very helpful.
I'd suggest SMS lib for sending SMSs via your cell phone using Java code.
But if you are open to other ideas, I'd suggest to use a public webservice that sends in your place your SMSs, you can use for example nexmo, they have very good api and charges very cheap SMS. You have an initial credit for starting.

wireless connection between mobile device and pc

I would like to establish a connection between a mobile device and computer so they can interact with each other. I should be able to send and receive data at both the ends, just like a chat client. How do I go about it? I just want to know the steps involved. I was thinking about sending the data from the device to a database server and then accessing it through the PC, and doing the same on the mobile device, too. Is this a good idea? What alternatives are there?
Since you're using android, this is pretty easy. One easy option is to code a client and server application for your android device and pc. Or, you could just send data on the UDP connectionless protocol.
I'm assuming you know how to build apps for an android phone. There is no need of an intermediate node (a database server or the like), if the goal here is as small as just sending data back and forth.
Here's a good example of a UDP server/client implementation.
And here's a good one for TCP server/client.
Hope that helps.

Implementing native android code with AIR code

After following these instructions to integrate Adobe AIR with native Android I have a few issues.
I have managed to get a bluetooth connection going in native android, setting up 2 BluetoothSockets which then shows the air app also packaged within the apk. This included air app requires 2 connections to somewhere (normally wifi).
I have it connecting to TestService1 and TestService2, which is then passing the traffic between these services and the BluetoothSockets.
It is a little slow as i have to put Thread.sleep(80) in between reading from bt socket and writing to the AIR app for it to work currently.
My 2 questions are
Is there any way to get the AIR app to know about and access the Bluetooth Sockets created in the Android code rather than having the 2 Services being the middle men?
Is this kind of release (hybrid) allowed in Android Marketplace does anyone know?
Really hoping to find an answer to question 1 as currently my bluetooth server is continously sending data and using the TestService1 and 2 to get this bluetooth data to the AIR app and is causing a 10 seconds lag.
Thanks in advance
These apps are definitely allowed in the Android market.
You should be able to send Bluetooth data immediately over the socket to the AIR app. It doesn't seem like you should need 2 separate services or a sleep. I think your service that is talking to the Bluetooth can also listen on a socket and send data over that socket when it gets it.

Detected android device connected to PC

I have an android devic, i wish to know when it is connected to the pc via java/.net
i know its possible - the Samsung New PC Studio is doing it, when ever i connect an android device it lets me know. how can i achieve the same?
You have to listen for one of this notifications
http://developer.android.com/reference/android/content/Intent.html
If you're using it as a mass storage device then use this
http://developer.android.com/reference/android/content/Intent.html#ACTION_UMS_CONNECTED
Other USB events aren't clearly described in the documentation
EDIT:
If you want to read on the computer side I would read this article
http://today.java.net/article/2006/07/05/java-and-usb
and then check which kind of devices are connected to the usb port. if it is a mobile phone, then you can try to send a short message to it. on your phone you make a small piece of code which returns an appropriate answer so you can detect thats its really android/your phone/this phones you want to identify
java device detection
This site have a guide on how to detect device with java web and java core
http://51degrees.com/Support/Documentation/Java/GettingStarted.aspx

How to read data from external BT dongle in core-java?

I am trying to read the data from external bluetooth dongle connected to my machine as soon as it receives the data from any other bluetooth device in java.I do not know how to achieve this.If any one knows how to do this please help me.
I got the solution for my own question.We can achieve this using "bluecove apis".The following links are very useful.
Bluecove_Link1
Bluecove
Bluecove_API_Reference

Categories