question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.info/connected doesn't come back online if app starts offline

See original GitHub issue

If you start the app without an internet connection the following code:

    implementation 'com.google.firebase:firebase-database:19.3.0'
        println("FIREBASE - addValueEventListener")
        FirebaseDatabase.getInstance().getReference(".info/connected").addValueEventListener(object : ValueEventListener {
            override fun onCancelled(p0: DatabaseError) {
                println("FIREBASE - " + p0)
            }

            override fun onDataChange(p0: DataSnapshot) {
                println("FIREBASE - " + p0.value)
            }
        })

logs this on startup

2020-06-04 01:21:28.750 21655-21655/dev.gitlive.GitLive I/System.out: FIREBASE - addValueEventListener
2020-06-04 01:21:29.048 21655-21655/dev.gitlive.GitLive I/System.out: FIREBASE - false

But doesn’t log true after coming back online.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nbransbycommented, Jun 4, 2020
0reactions
nbransbycommented, Jun 5, 2020

thanks for the clarification

Read more comments on GitHub >

github_iconTop Results From Across the Web

MaximoAnywhere Issues and Returns iOS app - offline mode
Maximo Anywhere Issues and Returns iOS App - The the app doesn't work in offline mode. After clicking on Enable Offline mode, Searching...
Read more >
Offline app - detect off/online via event rather than timer?
The question though is that when there's offline data saved locally to be sync'd, most of the examples out there either use a...
Read more >
Offline: When Your Apps Can't Connect to the Internet
Everyone experiences the frustration of being offline. When you design a mobile app which doesn't work without internet, you've made a decision ...
Read more >
How to Make Your Web Apps Work Offline | by Bowei Han
We need to keep track of actions made by a user while they were offline so that we can resync them with our...
Read more >
How to make PowerApps work when your remote users are ...
You may be wondering how PowerApps works if you do nothing to support offline mode. What works and what doesn't? If you create...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found