Author: Andrew Gyakobo
This following example is inspired by the following publication(s): website
This example serves to show how to connect and effectively perpetuate a tight bluetooth link between an Android device and a wearable WearOS device
- Open the 'AndroidManifest.xml' file and add the following permissions to both the Android and WearOS devices:
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
- Remember to definitely declare the service in the "AndroidManifest.xml" file for the WearOS device
<service android:name=".DataLayerListenerService">
<intent-filter>
<action android:name="com.google.android.gms.wearable.BIND_LISTENER"/>
</intent-filter>
</service>
- For both devices you'll have to in order to instantiate end-to-end communication you'll need to know each devices MAC address "00:00:00:00:00:00"
Note: The following development will soon enough be deprecated in favour of Kotlin. Java just seems to grotesquely large and outdated.