-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added signal to DBus interface #70
Conversation
…d within a watch app.
I hope everything is right, at least it works. |
Ok, I'll give this a test later on, and maybe remove that previous one. I'm not sure if this wouldn't be better if specifically subscribed to by an app, rather than just sending out every unknown keypress (rare though they will be). Need to review how the old Pebble API worked, and how GadgetBridge handles this. |
I think you're right, my solution is a little bit quick&dirty. So I looked into GadgetBridge. You can see in the sports api https://developer.pebble.com/guides/communication/using-the-sports-api/#handling-button-events that android apps can register a receiver for when the button is pressed. In the GadgetBridge log https://talk.maemo.org/attachment.php?attachmentid=39375&d=1496234264, you can see the button events coming in at 14:05:15.965 and 14:05:27.360. If you search for the log entries in the GadgetBridge code you will find the right places. |
That said I still don't know how to do things better. We have to use signals http://nemo-qml-plugin-dbus.readthedocs.io/en/latest/#id2 from QML code. Maybe we can provide a signal that has the UUID of the watch app as name. Then the SFOS app can listen to that specific signal. I don't know if that is possible. |
Thanks for the link, I will look at that. I think rather than emitting signals for the appids that are unknown, which will only work for those weird built-in apps, I can add a call to allow SFOS apps to request their own appids. However, I don't think that will affect what you're doing - even if you don't get chance to add the request quickly, Rockpool can still emit the unknowns. So I'll merge this for now. I'll drop the callback one though if you're not going to use it. |
Thanks for merging. I will not use the callback function, you can drop it. |
Ok will do. Is everything finished on your end now? I should wait until you're ready before I build and release this, in case there's something else you need to add. |
If it's OK maybe you could give me a few days to complete the pebble integration in my app. I will report back here when i'm ready. |
No problem at all. Good luck! |
org.rockwork.Manager gives me a list of known pebbles. Is it somehow possible to get the address of the connected pebble? |
I have an other problem now. I try to add ListWatches() and Version() as DBus properties. But that does not work. It seems to have something to do with the Q_SCRIPTABLE statement (dbusinterface.h): public: public slots: signals: private slots: private: |
HI abranson, I managed to get everything to work by using C++ functions. If you like, you can now release this version. |
Ok, I just need to get to the bottom of a crash on closing notifications, then I'll go for a new release. Thanks for the integration! |
Added a signal to DBus interface which is fired if a button is pressed within a watch app. The signal has UUID and button key as parameters.