Code Monkey home page Code Monkey logo

watch_connectivity's Introduction

Rexios's GitHub stats

Top Langs

watch_connectivity's People

Contributors

rexios80 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

watch_connectivity's Issues

Add information to readme for sending/receiving data in native android app

I'm sending data like this:

await watch.sendMessage({
  "type": "test",
  "data": "Hello from Flutter",
});

I'm trying to receive it like this:

class CommunicationService : WearableListenerService() {
    override fun onMessageReceived(messageEvent: MessageEvent) {
        super.onMessageReceived(messageEvent)
        Log.d(TAG, "onMessageReceived: ${messageEvent.path}")

        // Process the received message
        handleMessage(messageEvent.path, messageEvent.data)
    }

    private fun handleMessage(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
    }

    companion object {
        private const val TAG = "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

Release Android not receiving callback

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

which would actually be called proguard-rules.pro

Is this plugin for Smartphones or watches?

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.

[iOS] Background messages?

Currently have it working great, but requires the app to be in the foreground to work.

Do i need to use a background plugin to run the logic for the apple watch to communicate?

[watch_connectivity_garmin] Exception on sendMessage for Android

Code example:

final watch = WatchConnectivityGarmin();
await watch.initialize(GarminInitializationOptions(applicationId: 'xxx', urlScheme: 'yyy'));
await watch.sendMessage(message);

Exception:
No implementation found for method sendMessage on channel watch_connectivity_garmin

When will you add an implementation of this method? Without it, it is difficult to imagine integration with an application for Garmin :)

Type 'WatchSessionDelegate' does not conform to protocol 'WCSessionDelegate'

I am getting this error when archive a project to push to TestFlight. everything runs fine on the simulators.

Showing Recent Messages
/WatchSessionDelegate.swift:12:7: Type 'WatchSessionDelegate' does not conform to protocol 'WCSessionDelegate'

WatchConnectivity.WCSessionDelegate:8:10: Protocol requires function 'sessionDidBecomeInactive' with type '(WCSession) -> Void'

WatchConnectivity.WCSessionDelegate:10:10: Protocol requires function 'sessionDidDeactivate' with type '(WCSession) -> Void'

About IOS WatchOS side

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?

Screenshot 2023-02-19 at 17 34 02

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.