java - Sending a Notification to Pebble -


i'm trying send notification pebble watch. i'm using code, the example website:

public void sendpebble(string title, string body) {     final intent = new intent("com.getpebble.action.send_notification");      final map<string, string> data = new hashmap<string, string>();     data.put("title", title);     data.put("body", body);      final jsonobject jsondata = new jsonobject(data);     final string notificationdata = new jsonarray().put(jsondata).tostring();     i.putextra("messagetype", "pebble_alert");     i.putextra("sender", "test");     i.putextra("notificationdata", notificationdata);      log.d("test", "sending pebble: " + notificationdata);     sendbroadcast(i); } 

i'm getting message in logcat, no notification on watch. procedure seems simple enough, there obvious missed? or documentation incomplete?

edit: obvious questions:

  • yes, watch connected
  • yes, have third party notifications enabled

okay, problem:

by default pebble app sends notifications watch while screen of phone off. development have screen active while phone connected via usb. so, solution was: enable "always send notifications" option in pebble app.

maybe spares else headache.


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -