react-native-meteor-websocket-polyfill icon indicating copy to clipboard operation
react-native-meteor-websocket-polyfill copied to clipboard

Checking for connectivity / current user

Open tvogels opened this issue 10 years ago • 3 comments

How would one go about checking for connection status in this framework? In the ideal case, I would be looking for a Meteor-style reactive variable that says whether the DDP connection is currently open and working or not. I want to use it to automatically reconnect after the app is reopened the phone awakes from 'sleep mode'.

On a similar note, I would also want the same for finding out whether the user is logged in. Something like Meteor.user() ...

Would this be difficult? Tips are very welcome.

tvogels avatar Sep 28 '15 15:09 tvogels

+1 This would be interesting to know if you have solved the problem already. Looking to migrate a meteor app into a mobile platform and having difficultly accessing the Meteor.user() helper

wbashir avatar Nov 20 '15 16:11 wbashir

I haven't solved the problem yet, unfortunately. I don't know enough about the platform to add such a feature at the current time. I'm still interested, though.

tvogels avatar Nov 20 '15 16:11 tvogels

See this repo and file for help with accounts: https://github.com/spencercarli/meteor-todos-react-native/blob/master/ReactNativeTodos/app/components/accounts/signIn.js

And this article: http://blog.differential.com/meteor-react-native-learning-from-experience/

elie222 avatar Feb 04 '16 14:02 elie222