Can somebody help me with converting the jason string to basic4android:
public void sendAlertToPebble()
{
final Intent i = new Intent("com.getpebble.action.SEND_NOTIFICATION");
final Map<String, Object> data = new HashMap<String, Object>();
data.put("title", getAlertTitle());
data.put("body", getAlertBody());
final JSONObject jsonData = new JSONObject(data);
final String notificationData = new JSONArray().put(jsonData).toString();
i.putExtra("messageType", PEBBLE_ALERT);
i.putExtra("sender", "MyAndroidApp");
i.putExtra("notificationData", notificationData);
sendBroadcast(i);
}
Thank you for any help.
- Steve