Hey so it was ‘Hell on Earth’ but I finally have native Bluetooth Low Energy (BLE) support for GearVR in Unreal Engine. I had to use custom everything. NVPACK 1R4. Apache Ant 1.9.6. Gradle 2.12. android-sdk-macosx ant build script defaults to using Java 1.5 which is ludicrous, I managed to get it to build with Java 1.7. I basically hand-tweaked the entire Java build process to get it to work. The Unreal Engine only supports deprecated build process, you have to support build.gradle to get anything current. No is going to be able to do this except senior developers, this really has to be updated to use build.gradle in order to make it accessible.
Importing our company’s JAR files didn’t work, I had to import the code directly and hand merge the RES folders, hand merge the manifest xml files, add the necessary android support libraries, and tweak the code to reference the correct namespace for BuildConfig and R. I’ve been trying to do this since December, it was my 5th attempt. Finally got it building today. I can’t emphasize enough the barrier of entry for this. All this would have been so much easier with build.gradle support.
Probably at least a few more days before I can post a video demo, I still need to finish up the thunking etc and set up correct consumption on the C++ side. More and more VR peripherals are BLE based so it will quickly become a detriment to the Unreal Engine if you continue lack of native BLE support. I would be able to share my fork if you were using build.gradle because then I could use our company’s public AAR files instead of having to import the private code directly. The goal of GearVR is untethered virtual reality, to get to that goal we need built-in native BLE support.
I go into the steps a little deeper here in a more contextually relevant thread Android Java Libraries in UE4 Game (OUYA SDK, Google Play Game Services, etc.) - Android Development - Unreal Engine Forums