Opensource Bluetooth JAVA API - java

I'm trying to build a very simple application that fetches all the discovered Bluetooth devices and do something with it. I looked around for some APIs to get started with, but the only one I could find was BlueCove. I tried using it, but it ended up having tons of issues. Majorly: com.intel.bluetooth.BluetoothStackBlueZ not available
I use Linux Fedora 20, JDK 1.7 and Intellij IDE. Can anyone suggest a reliable opensource Bluetooth Java API, that works properly on a linux environment and also has some appreciable documentation/tutorials?

Related

How to make a device available for a Bluetooth connection in Windows

I am developing an application that involves creating a Bluetooth connection between an Android device and a Windows 10/11 device. Getting the Android section working was pretty straight forward thanks to the detailed documentation, but not so much on desktop.
I want to get the local Bluetooth MAC address of my Windows device and then make it available from connection by the Android device which will use that MAC address to connect directly without needing to go through the discovery process.
I would like to use Java for the Windows application if possible. All I can find is from Oracle explaining it using the core Bluetooth API, but this seems to be removed from current versions of Java as the javax.bluetooth package isn't found. I'm using OpenJDK 17.0.2. Any similar stackoverflow questions I could find are extremely old and mention using this javax.bluetooth package which no longer exists.
Can anyone explain how we work with Bluetooth in Java in 2022? Are there any other languages that it is much easier to work with in you would reccommend over Java?

Sending data via bluetooth between Android phone and laptop running OS X

It seems like a relatively mundane task to make an app that can send data via bluetooth but I've been banging my head on this for the past few days so I'm looking for any ideas. I'm running OS X 10.10 and using a Nexus 5 Android device. Here's what I've tried so far:
I need a server program running on my laptop and I need a client-side android app running on my phone. However, (correct me if I'm wrong) the server program running on my computer needs to be able to access the Android Bluetooth API because I need to use the BluetoothServerSocket (based on the server-side code provided in Google's Android Bluetooth tutorial).
Since it's server-side code, I need to run it on a server so I built a Java Servlet which I ran from inside Eclipse but I didn't know how to access the Android API from inside a dynamic web application.
So I started following this approach where the Bluecove library made that possible: http://luugiathuy.com/2011/02/android-java-bluetooth/
I tried getting Bluecove to work with OS X but there are a whole host of issues involved with that. I found some workarounds and then got an error dealing with the IOBluetoothLocalDeviceReadSupportedFeatures device that Apple removed in its later OS versions (but Bluecove depended on it).
I found a fix here that installed the old IOBluetooth library and changed the DYLD_LIBRARY_PATH to point to it. Unfortunately, this had no effect (I don't know if I changed the library path properly...I followed the instructions from Solution 1 in the answer from this post).
In any event, I feel like I'm overcomplicating this task and am looking for any guidance - in terms of overall approach or a specific thing I missed. The primary issue is accessing the Android Bluetooth API inside the server program intended to run on my laptop.
I eventually ended up using WiFi to send data since there was better software support for that.
But if someone wants to pursue the Bluetooth path, one possibility is to run OS X Lion (which had the IOBluetooth library) as a VM and run the server-side Bluecove code on the VM. This would require a separate Bluetooth USB dongle to be attached because the VM can't access the bluetooth hardware of its host machine - there may be a way but by default it can't access the in-built bluetooth hardware.
Not an ideal solution but I don't know if there is much choice until Bluecove releases a version that is supported on recent OS versions.

develop java application on Microsoft Windows Mobile 6.5.3 Professional

I am totally new in Microsoft Windows Mobile 6.5.3 Professional. I an a java developer. I develop application for Android Phone but new in Windows Mobile. So please give the information how this is possible.
What is the SDK for this OS.
How I configure my Eclipse for this.
how I get the Emulator?
I must need to know C++ ?
Where I get the tutorials from the starting.
As far as an IDE goes you cannot use VS 2010 for WM6. VS2010 only works on WM7. You have to use VS2005 Standard or up or VS2008 Pro or up.
Being a Microsoft platform it uses .net. While there are a few differences between c# and Java, it is nothing a competent developer cannot overcome.
Following is an article on getting started.
http://msdn.microsoft.com/en-us/library/bb158522.aspx

Java Application on Smartphone

What alteration should be made in a Java Application to be able to install it on Java Enabled Smartphone?
I tried using a random app of mine to see what happens, when I open it on the cell, it says Install? I say yes, and it says invalid file.
Now I was wondering what alteration should be made?
My smartphone (Samsung S8500) runs on bada which is more or less the same as Android, but alterations in the General.
You need different SDK for smartphones. Like for Android, you need Android SDK 1.5 or any other version. You just cannot install the same application. You need to develop using the resources provided by the SDK.
If your application is Java based mobile application then you can use some tools to convert it for Android. Doesn't work every time but worth a try.
In your case, Bada OS is not like Android what i learn from here. So, you need to develop the application using J2ME .

Using Android libs on a desktop Java VM (like OpenJDK or OracleJDK)

I have never tried out the Android SDK and do not own an Android phone. However it seems that certain libraries are excellent, for example the text to speech lib. Is it possible to use this library with a desktop VM and did anybody here try this?
You could get the sources from android.git.kernel.org and try to rebuild them against a desktop environment, but it would be a lengthy project - you need not only the java stuff, but the underlying drivers, native libraries, customized c library, and add-on os functionality to support them.
The android SDK includes a qemu-based phone emulator in which most functionality works as on the device. This should be fine for playing with the capabilities, though is not something you would want to use to deploy them. There is also an x86 community build of android which people put on netbooks or run in virtualbox. Word is that the official android emulator may be moving to something similar since it's substantially faster to run x86 code on a customized os image in a vm than to emulate an arm processor.
There's also something of a simulator which tries to provide enough of the android o/s services to sort of run apps natively on the development machine without a vm, but the google folks have implied its a bit of a hack and not well maintained.

Categories

Resources