Send Hashset of data from Android to Firebase cloud function

Keywords´╝Ü android firebase google-cloud-functions

Question: 

I am trying to send a set of objects from Android app to cloud function. What I have is not working. How might I fix it?

On Android side:

override fun doStuff(input:Set<Dogs>){
  val data = hashMapOf("dogs",input)

  firebaseFunction.getHttpsCallable("sendDogs")
    .call(data).addOnSuccessListener{...}
    .addOnFailureListener{...}

}

On the server side I am just trying to log:

exports.sendDogs = functions.https.onCall((data,context) =>{
    console.log("DATA:");
    console.log(data);
    console.log("Data entries::");
    console.log(data.entries);
    return "this is not logging";
}
  1. if I use val data = hashMapOf("dogs",input) it doesn't log and return failure

  2. if I replace with val data = "no hashmap just string" it works fine.

Answers: