delight-im / Android-DDP

[UNMAINTAINED] Meteor's Distributed Data Protocol (DDP) for clients on Android
Apache License 2.0
274 stars 54 forks source link

onDisconnect bug? #33

Closed galimpic closed 9 years ago

galimpic commented 9 years ago

in Meteor.java, disconnect() method, on line 225 mCallback is set to null - therefore, onDisconnect() callback will never be fired. Is that a bug or is onDisconnect() supposed to happen only for non-user initiated disconnect? (sorry if I didn't ask this the right way or in the right place - this is my very first post on GitHub)

ocram commented 9 years ago

Thanks for your question!

The disconnect() method is what you can call manually to disconnect from the server, e.g. when shutting down your app.

So you will probably be removing the listener anyway (perhaps your Activity is being destroyed already) and waiting for the callback doesn't provide much value here, right?

So yes, one could say the callback is only for events not initiated by the user.

Does that help (and make sense)?

galimpic commented 9 years ago

Makes perfect sense. BTW, I am just finishing creating a wrapper for this library for Basic4Android, so users will be able to make Meteor clients using that IDE, too.

ocram commented 9 years ago

Great! Thanks for reporting this, nevertheless, and for providing a precise description.

Didn't know about Basic4Android, but looks quite powerful :) Maybe we should link your project here when it's complete.

isdzulqor commented 8 years ago

Map signInValues = new HashMap(); signInValues.put("email", email); signInValues.put("password", password); mMeteor.call("/users_booklook/find", signInValues);

why I cant call method with 2 parameter like above in my android .

ocram commented 8 years ago

@isdzulqor Please open a separate issue for every new problem :) What's the error message with your piece of code? In general, it looks good. Let's discuss this in a new issue.