Comments (7)
cc @garanj I wonder if it's useful for other apps.
from horologist.
@yschimke the 100 000$ question is about the battery usage of BT vs wifi, in the doc you suggest no BT for more that 1 Mb. But is there any data to help justifying that the gain is so huge it can be beneficial for maybe a little lower sizes too. (For the cases that do not care about speed of course).
from horologist.
These are just guides. They are written to be fairly black and white, to ensure that most apps just do the safe/optimal thing. But if you have a specific case, such as needing particular network access, then you can make an educated call and check it isn't draining the battery super fast.
from horologist.
Well in my case the need is to transfert large amount of data from the phone to the watch in the most efficient way possible battery wise. Speed would be nice but probably secondary. So I don't have a particular network need, if BT is battery efficient to transfert 500Mb+ of data then it's ok for me. The docs seems to imply wifi would be best for battery hence this request.
from horologist.
There are two issues with BT for this
- It's going to be slower, you'll keep the app awake longer running the copy, than if you got it straight via Wifi.
- BT is a shared resource, you'll saturate the connection, and other things between the watch and notification could be delayed.
But they are very different APIs also.
I don't know to treat the BT connection as a socket to the mobile. So it's Data Layer APIs unless you have more information.
from horologist.
From the doc I would have do the ChannelClient way as it seemed to be the solution to that and tried to build some kind of channel that would go through Wifi. This part of wear is new to me and there's little doc about it. And horologist all nice stuff is about downloading from internet.
On another Wear app without such constraints I use DataClient but this does not fit this need at all.
Edit: But in all cases thanks for the confirmation that I should not try to achieve that via BT :)
from horologist.
I'm trying to do something similar and came across this. After reworking the DataLayer sample to use ChannelClient
, it unfortunately continues to use Bluetooth, so I tried using raw sockets in Ktor. A 500mb file, which was on target to take just under an hour to transfer over Bluetooth via ChannelClient
, took just under two minutes to transfer over Wifi via Ktor. Rather than completely redoing everything, I imagine I'll just end running Ktor as an HTTP server and dynamically generating the JSON files.
from horologist.
Related Issues (20)
- Using rotaryWithScroll and onRotaryInputAccumulatedWithFocus simultaneously HOT 7
- AGP 8.3.0 upgrade is blocked
- Improve Tile tracking initialization HOT 1
- Some datalayer docs out of date HOT 1
- [FR] Expose beyondViewportPageCount to PagerScreen HOT 1
- Some screenshot tests not completing HOT 5
- horologist-datalayer-watch dependencies HOT 6
- Horologist
- Tile "Bitmap.toImageResource()" enforce RGB_565 without possibility to change and keep alpha. HOT 2
- FR: Tiles API for GraphicsLayer HOT 1
- Create a test to cover edge cases with Scaffold HOT 1
- android_wear_capabilities and resource shrinker HOT 5
- Add possibility to set `initialCenterItemIndex` when using `rememberResponsiveColumnState`
- Adopt a conventions gradle plugin HOT 1
- Cannot override color for ResponsiveListHeader HOT 8
- Using Horologist wrapper for SwipeDismissableNavHost: Cannot find startDestination kotlin.String from NavGraph. HOT 9
- Change Card content type to match Wear Material's Card
- Material ToggleChip should allow overriding Icon tint HOT 1
- Adopt alpha compose bom HOT 1
- Check TimeText is 2.dp after https://github.com/google/horologist/pull/2397 HOT 1
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 horologist.