3G data is intermittently disconnected or Socket is not connected and socket timeout or connection excitation is coming out. I don't believe you. Most of the time, it looks like a shaded area Is there a library or a way to check the network status in detail? Please reply.
ps. 3G connection status and ping check logic are included.
android library
Once you look at this part, you can get a broadcast receiver for the state of your network connection.
Register the receiver and work according to the network environment.
I don't know if your app is periodically networking or pressed by people, but if you create and run a network worker and it goes down in the middle, you can pause it, activate the network, and then run it again.
There are many ways to operate your network in the background. https://developers-kr.googleblog.com/2018/12/modern-background-execution-in-android.html I think you can refer to this.
© 2024 OneMinuteCode. All rights reserved.