Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android #35

Closed
blumanski opened this issue Sep 23, 2016 · 7 comments
Closed

Android #35

blumanski opened this issue Sep 23, 2016 · 7 comments

Comments

@blumanski
Copy link
Contributor

blumanski commented Sep 23, 2016

I know, this is still in progress.
I am testing a bit at the moment and noticed some stuff.

On IOS the code below works fine, it is getting data and is updating data on change.
The same code does not work on android yet.

_this = this
        this.props.FirebaseStack.database.ref('chat/Zeitkapsel/messages').on('value', function(snapshot) {
            _this.setState({
                dataSource: _this.state.dataSource.cloneWithRows(snapshot.value),
                animating: false
            });
        })

On android, the code below works, so, "once" works

       _this = this;

        this.props.FirebaseStack.database.ref('chat/Zeitkapsel/messages').once('value')
            .then(function(snapshot){
                _this.setState({
                  dataSource: _this.state.dataSource.cloneWithRows(snapshot.value),
                  animating: false
                });
            })
            .catch(function(error){
                console.log(error);
            })
@auser
Copy link
Contributor

auser commented Sep 23, 2016

Oh yikes! I'll check that shortly. Thanks for reporting!

@blumanski
Copy link
Contributor Author

It seems just to load and the callback never finish, no error message either.
Thanks for looking

@auser
Copy link
Contributor

auser commented Sep 23, 2016

Hmm... I can't replicate it... it's working here... Are you using the npm version or the github version? @blumanski

by the way, I am in the gitter channel if you want to chat real-time

@blumanski
Copy link
Contributor Author

blumanski commented Sep 23, 2016

I am using the npm version, I will retest it tomorrow, may it's another problem.
I will upgrade to the master branch and see how that goes.

Thanks @auser

@auser
Copy link
Contributor

auser commented Sep 23, 2016

Awesome @blumanski

I believe the npm and github version are much different than each other. I'll tag the next release

@blumanski
Copy link
Contributor Author

@auser
I just tried it using the master branch instead of the npm version.
It works fine.

I did run into some IOS build trouble, I will try again to get it run and let you know.
Cheers

@auser
Copy link
Contributor

auser commented Sep 26, 2016

Did you figure out the iOS build issue?

Get Outlook for iOS

On Sun, Sep 25, 2016 at 5:26 PM -0700, "Oliver Blum" notifications@github.com wrote:

Closed #35.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants