Code Monkey home page Code Monkey logo

Comments (22)

Rexios80 avatar Rexios80 commented on September 13, 2024 1

There is a way to send "data" as well that isn't implemented maybe that would do what you need?

from watch_connectivity.

Rexios80 avatar Rexios80 commented on September 13, 2024

The app shouldn't need to be in the foreground to work

from watch_connectivity.

Rexios80 avatar Rexios80 commented on September 13, 2024

Unless the phone app is dead then yeah that doesn't work right now

from watch_connectivity.

rodydavis avatar rodydavis commented on September 13, 2024

from watch_connectivity.

Rexios80 avatar Rexios80 commented on September 13, 2024

I'm going to need more details on exactly what you're trying to do

from watch_connectivity.

rodydavis avatar rodydavis commented on September 13, 2024

from watch_connectivity.

Rexios80 avatar Rexios80 commented on September 13, 2024

If you need to send data to a dead companion app, then you should probably be using context and not messaging

from watch_connectivity.

rodydavis avatar rodydavis commented on September 13, 2024

from watch_connectivity.

rodydavis avatar rodydavis commented on September 13, 2024

from watch_connectivity.

Rexios80 avatar Rexios80 commented on September 13, 2024

If you're using context what's the issue? You can read the most recent context with receivedApplicationContext

from watch_connectivity.

rodydavis avatar rodydavis commented on September 13, 2024

from watch_connectivity.

Rexios80 avatar Rexios80 commented on September 13, 2024

I see. This would require the implementation of the following: https://developer.apple.com/documentation/watchkit/wkwatchconnectivityrefreshbackgroundtask
https://developers.google.com/android/reference/com/google/android/gms/wearable/WearableListenerService

from watch_connectivity.

Rexios80 avatar Rexios80 commented on September 13, 2024

I've been meaning to implement those for a while, but I haven't gotten around to it

from watch_connectivity.

rodydavis avatar rodydavis commented on September 13, 2024

Ok cool! Might make a PR

from watch_connectivity.

Rexios80 avatar Rexios80 commented on September 13, 2024

@rodydavis I'm working on a separate plugin to facilitate the calling of flutter code from native code, so if you put any of that logic in the PR for this just know it will most definitely change in the future

from watch_connectivity.

rodydavis avatar rodydavis commented on September 13, 2024

Ok I solved my problem a different way! I had a big json file to send and just chunked it over and saved it with FileManager.

Then I am using the navigation view in swift ui.

something I think that could be useful is docs on how to add the iOS and android watch targets.

from watch_connectivity.

rodydavis avatar rodydavis commented on September 13, 2024

Send file might work! The file is a single JSON file and is about 1.4 MB which exceeds the context limit.

The json file is created from a minimal amount of data from the SQLite DB in the iOS app, but now I only need to sync once and the watch doesnt require the link

Screenshot 2023-02-23 at 9 24 27 PM

Screenshot 2023-02-23 at 9 24 34 PM

from watch_connectivity.

Rexios80 avatar Rexios80 commented on September 13, 2024

Maybe protobuf could reduce the size of the message

from watch_connectivity.

Rexios80 avatar Rexios80 commented on September 13, 2024

So it turns out receiving messages from the watch when the phone app is dead doesn't require anything special. It just works. @rodydavis if you listen to the message stream early enough in your app startup, you should be able to get the messages just fine.

from watch_connectivity.

Rexios80 avatar Rexios80 commented on September 13, 2024

For iOS, Android still requires a lot of work

from watch_connectivity.

rodydavis avatar rodydavis commented on September 13, 2024

Ok sounds good! Thinking about building wear OS directly

from watch_connectivity.

Rexios80 avatar Rexios80 commented on September 13, 2024

Closing since this was about iOS and that works. We can make a new issue for Android.

from watch_connectivity.

Related Issues (13)

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.