I’ve got an idea to make a kind of ‘non-wearable’ wearable out of my Raspberry Pi that already sucessfully runs some sensors (PIR, etc.) and can connect to Android Phone via Bluetooth, but I’m having trouble integrating it with the Sleep app.
Firstly, it’s not obvious, what exactly API should I use: intent API or wearables API.
As I understood, to use wearable API, Sleep app somehow should detect my device as ‘connected’, which it probably will not, as it is not whitelisted, right?
(It would be really great to be able to use the Wearable API instead of Intent API, so that I don’t need to create my own Android app. )
Anyway, I tried to use intent API and even created some kind of a transitional, intermediate Android app that would collect data from Raspberry Pi’s sensors over Bluetooth and send it to Sleep as Android. But… seems like I cannot make Sleep app intentions working.
I used MIT App Inventor 2 to create the intermediate app and tried to send the very first intent to Sleep app with this:
And I’ve got 601 error ‘No corresponding activity was found’.
Maybe should I also set the ActivityClass (but to what value? no docs on that matter) or something else to make it work? Or am I doing something conceptually wrong? Just FYI, I actually managed to trigger some other intent
com.urbandroid.sleep.ACTION_START_SLEEP_TRACK_FROM_ACTIVITY, it, ofc, finished with an error, but at least I understood Sleep is responsive to intents from my app in general.
P.S. I’m not an android dev, so all this intent-stuff is kind of new to me.