Question

My app is showing an AlertDialog to the user if internet connectivity is lost. For this I am using BroadcastReceiver which detects Network connectivity constantly and shows the dialog if no network is available. Everything is working fine and as expected.

The problem starts when an incoming or outgoing call is made. The AlertDialog(notifying about internet connectivity) pops up even if user answers an incoming call or makes an outgoing call. This leaves a very bad user experience.

Can anyone please guide me why its happening? Please help. Thanx in advance.

Was it helpful?

Solution

Well every network carrier provides single connection at a time. That means when ever you start a call your Network Service go down and when no calls there is it comes Up. So when ever you are making a call check your GPRS/Network symbol in device itself goes unavailable(Offline).

This is why your broadcast receiver responding.

Hope this will help you resolving the issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top