Comments (22)
There is a way to send "data" as well that isn't implemented maybe that would do what you need?
from watch_connectivity.
The app shouldn't need to be in the foreground to work
from watch_connectivity.
Unless the phone app is dead then yeah that doesn't work right now
from watch_connectivity.
from watch_connectivity.
I'm going to need more details on exactly what you're trying to do
from watch_connectivity.
from watch_connectivity.
If you need to send data to a dead companion app, then you should probably be using context and not messaging
from watch_connectivity.
from watch_connectivity.
from watch_connectivity.
If you're using context what's the issue? You can read the most recent context with receivedApplicationContext
from watch_connectivity.
from watch_connectivity.
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.
I've been meaning to implement those for a while, but I haven't gotten around to it
from watch_connectivity.
Ok cool! Might make a PR
from watch_connectivity.
@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.
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.
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
from watch_connectivity.
Maybe protobuf could reduce the size of the message
from watch_connectivity.
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.
For iOS, Android still requires a lot of work
from watch_connectivity.
Ok sounds good! Thinking about building wear OS directly
from watch_connectivity.
Closing since this was about iOS and that works. We can make a new issue for Android.
from watch_connectivity.
Related Issues (13)
- Add receive/send file HOT 3
- Is this plugin for Smartphones or watches? HOT 1
- [watch_connectivity_garmin] Exception on sendMessage for Android HOT 4
- Swift Compiler Error (Xcode): Type 'WatchSessionDelegate' does not conform to protocol 'WCSessionDelegate' HOT 23
- [iOS] session(_:didReceiveMessage:) is interrupted by phone call HOT 17
- Can watch_connectivity be used to read the heart rate? HOT 2
- [watch_connectivity_garmin] Android not receiving messages HOT 4
- Pair Apps need same package name and signature HOT 1
- About IOS WatchOS side HOT 12
- Add information to readme for sending/receiving data in native android app HOT 4
- Release Android not receiving callback HOT 4
- Type 'WatchSessionDelegate' does not conform to protocol 'WCSessionDelegate' HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watch_connectivity.