Closed romaluca closed 8 years ago
Thanks for your feedback!
The error message says that the first argument must be an object but judging from your code new Object[] { listId, newName }
, your first argument is either a string or an integer, depending on what the exact type of listId
is.
An object in JavaScript would be a Map
in Java.
Does this help?
Hi, I tried like you said. And it works! But doesn' t work with dates. I have getstartat that returns a Date:
Map<String, Object> contestMap = new HashMap<>();
contestMap.put("name", c.getName());
contestMap.put("startAt", c.getStartAt());
...
meteor.call("contests.update", new Object[] { contestMap }, new ResultListener() {
Where getStartAt returns a date. In meteor i receive this:
{ name: 'Sdfsdd',
startAt: 1459442641702,
...
}
And in android i receive the error:
validation-error Start at must be a Date
Is a my problem or is a bug library?
Thanks for your help!
@romaluca Great to hear that it works :)
Let's discuss the date issue in a separate issue: https://github.com/delight-im/Android-DDP/issues/82
I've already added an explanation there that might help you.
Hi! I'm try to follow the new guide of Meteor 1.3 for my project. So i saw that in their example they use ValidateMethod for define methods like in this file: https://github.com/meteor/todos/blob/master/imports/api/lists/methods.js
the problem is that if i use the validate:
and if in android i use your method:
mMeteor.call("myMethod", new Object[] { listId, newName });
i receive an error:
How can i do?
Thanks!