After reading numerous questions regarding the inability to stream GPS data from the band I'm wondering whether or not GPS can simply be enabled through a third party app. My goal is to create a run tracking app, very similar to the stock one, but this one will provide haptic feedback when it's time to start and stop a prescribed interval. Very similar to Guided Workouts, but with GPS enabled. I don't want to stream the GPS data, just simply turn it on, store it to the band, and then let it sync up once I'm back with my phone. I don't run with my phone, just my band and a pair of shorts. :)
The Band SDK does not expose a means to accumulate and then retrieve sensor data from the Band. An application using the SDK can only stream sensor data in real-time.
Related
I'd like to build an app that can communicate with an unlimited number of beacons. The idea is to have a single app that the user can user in anywhere in the world in partner stores. I understand that iOS has a limit of 20 regions for a single app and each region can register unlimited number of beacons.
Does the limit of 20 means the app can simultaneously deal with only 20 regions at a time or 20 is an absolute limit of UUID? In other words can I register thousands of UUID and based on the user location only 20 are active at a time?
Many thanks for your help.
On iOS, a maximum of 20 CLRegion instances can be registered for monitoring at one time. Each one of these must specify at least a ProximityUUID, but can leave the major and minor null, matching any of the billions of beacons with that same ProximityUUID. But there are also potentially many many billions of different Proximity UUIDs, so this certainly won't match all beacons.
While you can't register more than 20 ProximityUUIDs for monitoring at any one time, you can change the ones registered as your location changes as you suggest. I actually built a web service called Ningo that lets you fetch a list of the known ProximityUUIDs that have been detected previously within a given distance of your location. There is also a free and open source iOS client library SDK for that here along with a full-blown reference app (free source code included) that does just exactly this so that you can detect almost any beacon around.
One other simpler alternative is to simply use iOS Ranging APIs. Unlike monitoring APIs, there is no limit on how many CLRegion instances you can register for ranging, although practical limits mean that the system really slows down once you register more than about 100. The Ranging API, will let you detect any beacon if your app is already running, but unlike Monitoring API, it they won't let you wake up your app when a beacon appears. But again, since the phone will slow down to a crawl if you try to register many thousands of regions, this is not a practical way to detect any beacon.
I'm currently making an app for myself to collect battery temperature data, and storing it in a Firebase database. However, if I want to run the app on a different device, they'd be writing to the same area at the same time, and hence it'd be hard to distinguish which device is which in the database. Is it possible to add some sort of unique device ID so that I can distinguish data collected from multiple devices at the same time, being stored onto the same Firebase database?
You can generate a random UUID which is essentially guaranteed to be unique, then remember/persist that in your app on that device. You're not saying what platform you're coding for, so it will be up to you to find a library to generate one. This should be pretty easy. With Java, there's a UUID class that can do this for you.
I would like to use Firebase for analytics on iOS and Android app. My users are most of the time in remote area with poor or no network. I would like to optimize battery life so I don't want firebase to create web requests all the time. Is there a way to dispatch data only on command ?
I would like to have the same behaviour than google analytics with the analytics.setLocalDispatchPeriod(0); and send data only when the user is connected to wifi for example.
The SDK already tries to minimize the upload interval times to one per hour to avoid draining battery. If there is any problem with the network, it won't retry immediately but in hours later or back-off if needed. It also has several methods to optimize data latency so it won't be good to freely control the scheduling system.
I've been putting together a mechanism to sync activity data collected by the MS Band with our backend via the cloud API and getting all the boilerplate setup for the OAuth flows... The intent being to periodically run this data through our backend processes to categorise periods of meaningful walk based activity.
I've been experimenting with the data available and as far as I can tell we cannot get access to the raw step data (or at a fine grained level )? We have successfully been able to request summary info by hour/day, however this is not fit for our purpose.
What I'd like is to access step data in the form [startTimeStamp,endTimeStamp,stepsTaken,...] where each record represents a continuous period of movement by the wearer.
We would also be able to work with data summarised by minute as this would give enough context to our use case.
Is this possible via the cloud API? or are there any plans to implement the Period "Minute" on the summary API endpoint?
https://api.microsofthealth.net/v1/me/Summaries/Minute?startTime=2015-12-09T14%3A00%3A00.369Z
If this isn't possible perhaps there is another way to make this data available? (via HealthKit on iOS or Fit on Android?)
As a complete alternate perhaps it might be possible to get the accumulated step data detail from the band via bluetooth in a similar fashion to the native MS Health App?
We already use the SDK to stream realtime Heart Rate data during user cardio sessions, but there appears to be no way to extract the historical step info from the band directly.
Thanks!
the Band itself monitors and logs the steps over time. When sync'ing, that log is transferred to the Cloud via the Microsoft Health app. The app then pulls the "steps for the day" from the Health service.
These logs are not exposed to apps via the SDK. The only way to calculate steps per custom short period yourself is to have your app sample the counter in the background on a frequent enough basis in order to do the calculation.
I just have a general question. Can you send a url from a button on the band. I have a home automation system that you can trigger events by sending a RESTful url (endpoint) to. Basically I can put the url in any web browser and trigger the event. It would be great if this could be done through the Band. I don't really need a response from the Url, just to send it.
Does that make sense?
Thanks,
Scott
No, the Band communicates only via Bluetooth to (applications on) its paired device. On Windows (Phone), the application must be running, with a connection to the Band, and subscribed to the Tile button pressed event in order to receive such notifications. This generally rules out scenarios that require ad-hoc input from the Band unless you're willing to use voice commands via Cortana.
But i think its possible by creating custom tile and handling custom tile events. Haven't tried it in my project but can see from sdk documentation.
For android you can implement broadcast receiver and listen to tile events. Check: sdk doc
Chap 9, page 51
In short, yes it is possible.
However, the problem would be that the button would be single use to only send that ONE URL command and it actually wouldn't be done via the Band.
You can create custom layouts for your applications with the Microsoft Band SDK which will allow you to create a button. You'll then need to register to the click event from the Band which then would get fired on the device the app is running on. From there, you'd be able to send the URL but it would be sent from the Windows Phone or Windows PC rather than the Band so you'd need to be connected. The documentation covers how you can do this here: http://developer.microsoftband.com/Content/docs/Microsoft%20Band%20SDK.pdf
A downside to doing this with WinRT is that as soon as the app is closed and the connection to the Band is lost, your button click won't have any action. The best way to get around this is to create the connection to the Band in a background task but unfortunately, you can't keep hold of the connection to the Band for an infinite amount of time and you'd have to live with the possibilities that you may have times where it doesn't work. I have a GitHub sample which shows you how to connect to the Band in a background task for an indefinite amount of time.
The Microsoft Band has really been developed for the Health aspect and collecting data rather than interactions with other apps which it does in some way support.