From 9f07dfcd460bbfa1aec780dfa4f1dacbd140682e Mon Sep 17 00:00:00 2001 From: Salakar Date: Sun, 8 Oct 2017 16:36:01 +0100 Subject: [PATCH] [android][firestore] `Long` type fix: #479 --- .../io/invertase/firebase/firestore/FirestoreSerialize.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/src/main/java/io/invertase/firebase/firestore/FirestoreSerialize.java b/android/src/main/java/io/invertase/firebase/firestore/FirestoreSerialize.java index 6ab033ae..36ade3c4 100644 --- a/android/src/main/java/io/invertase/firebase/firestore/FirestoreSerialize.java +++ b/android/src/main/java/io/invertase/firebase/firestore/FirestoreSerialize.java @@ -147,6 +147,8 @@ public class FirestoreSerialize { writableArray.pushBoolean((Boolean) item); } else if (itemClass == Integer.class) { writableArray.pushDouble(((Integer) item).doubleValue()); + } else if (itemClass == Long.class) { + writableArray.pushDouble(((Long) item).doubleValue()); } else if (itemClass == Double.class) { writableArray.pushDouble((Double) item); } else if (itemClass == Float.class) { @@ -184,6 +186,8 @@ public class FirestoreSerialize { map.putBoolean(key, (Boolean) value); } else if (valueClass == Integer.class) { map.putDouble(key, ((Integer) value).doubleValue()); + } else if (valueClass == Long.class) { + map.putDouble(key, ((Long) value).doubleValue()); } else if (valueClass == Double.class) { map.putDouble(key, (Double) value); } else if (valueClass == Float.class) {