简体   繁体   中英

Pop-up for No Internet Connection in Android App

I am using Firebase in My Android App for Login & Register . App Login Page is My Launcher Activity. I want to have a functionality that if user is not connected to Internet or WiFi , it Shows the pop-up of No Internet Connection. How to Achieve It ?

You can use this answer : How to catch an Exception if the Internet or Signal is down

Or check result / put try - catch around GoogleSignIn.getClient(this, gso);

You should look at this question to detect if internet is connected. If no, use AlertDialog (or any other "pop-ups") to show message to user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM