From 4c11161f14f8bf1f73f5c44800e3c46b2b3c7990 Mon Sep 17 00:00:00 2001 From: Tal Davidi Date: Mon, 26 Mar 2018 16:44:05 -0400 Subject: [PATCH] Add Integer serialization to JSON converter Required to make vibration work for scheduled notifications. May need to add other types also. (Double off the top of my head) --- .../io/invertase/firebase/messaging/BundleJSONConverter.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/src/main/java/io/invertase/firebase/messaging/BundleJSONConverter.java b/android/src/main/java/io/invertase/firebase/messaging/BundleJSONConverter.java index d784f694..e90ed8c3 100644 --- a/android/src/main/java/io/invertase/firebase/messaging/BundleJSONConverter.java +++ b/android/src/main/java/io/invertase/firebase/messaging/BundleJSONConverter.java @@ -166,6 +166,8 @@ public class BundleJSONConverter { jsonArray.put(objValue); } else if (objValue instanceof Bundle) { jsonArray.put(convertToJSON((Bundle) objValue)); + } else if (objValue instanceof Integer) { + jsonArray.put(objValue); } else { throw new IllegalArgumentException("Unsupported type: " + objValue.getClass()); }