await watch.sendMessage({
"type":"test",
"data":"Hello from Flutter",
});
I'm trying to receive it like this:
classCommunicationService : WearableListenerService() {
overridefunonMessageReceived(messageEvent:MessageEvent) {
super.onMessageReceived(messageEvent)
Log.d(TAG, "onMessageReceived: ${messageEvent.path}")
// Process the received message
handleMessage(messageEvent.path, messageEvent.data)
}
privatefunhandleMessage(path:String, dataBytes:ByteArray) {
val data =String(dataBytes, Charsets.UTF_8)
val data2 = dataBytes.toString()
Log.d(TAG, "data: $data")
// Handle the message based on the path and data
}
companionobject {
privateconstvalTAG="CommunicationService"
}
}
The result is something like this (from logcat):
data: ��??�sr??�java.util.HashMap������`��??�F??
loadFactorI?? thresholdxp?@??????????w�??????�??????�t??�datat??�Hello from Fluttert??�typet??�testx
I had a problem when, in release, the android app was not getting data sent from the garmin.
Turns out it was because of code obviscation, to fix; I changed my build.gradle to not minify code
release {
signingConfig signingConfigs.release
shrinkResources false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
and added a proguard file to leave the classnames required alone. proguard-rules.txt
Need to know if the plugin is for connecting watches using android or ios phones or
If it is for running the flutter apps in smartwatches and then getting data from them.
I get this error when attempting to build the app from flutter build ios. I know that you include the required protocols for sessionDidBecomeInactive and sessionDidDeactivate. I also include the protocol activationDidCompleteWith in the watch os code.
Hi, I am a bit confused my watch os app is not reachable from the app side. When i investigate the example project creating watch os extension is not same on xcode 14.2.
I can only create a watch app for existing ios app on XCode 14.2. And when i do that watch app says its reachable but app side its not reachable. Is there any documentation how to crate the watch os side?