Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

How to send back an ack message to the PebbleApp after receiving an AppMessage... #2

Open
Eti2704 opened this issue Dec 16, 2014 · 1 comment

Comments

@Eti2704
Copy link

Eti2704 commented Dec 16, 2014

Hey folk,
Using PebbleSharp... what is the best way to send an ack message to the PebbleApp after receiving an AppMessage from this PebbleApp...

Any help would be appreciated.

Thx
cheers,
Eti

@Keboo
Copy link
Owner

Keboo commented Dec 20, 2014

Hi Eti2704. Unfortunately I do not have a straight answer for you. This library was originally base don the flint project, and I took a lot of the information needed to build this from libpebble (https://github.com/Hexxeh/libpebble/). So PebbleSharp is certainly lacking some of the latest additions to the SDK.
With that said, to answer your question. If you connect your pebble with a PC and run the Demo WPF app you should see your app message come through. Start with a break point in ResponseManager.HandleResponse. If you still don't see the app message you expect move up to PebbleProtocol.ReadAndProcessBytes().
Once you know what the response should look like. You can register a callback to response to the message when it is received. See PebbleMediaViewModel for an example of how I did this to handle the music controls (though it is worth noting that in the latest firmware release something has changed so the messages are not getting though).

I suspect it will take some digging into PebbleKit (https://github.com/pebble/pebble-android-sdk/) to determine exactly what the message needs to look like. There are certainly updates and improvements that need to be made to the library but right now I have very limited free time to make the updates.

This was referenced Feb 16, 2016
brookpatten added a commit that referenced this issue Feb 20, 2016
Add Support for firmware v3 app installation, app messaging, and bundle processing.  PR #5.  Should resolve issues #2 and #4 .
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants