Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Programmatically Reset Phone Radio Network Signal

Is there a way to RESET Phone Radio Network Signal in android app ? (This might be equivalent to pulling out and in SIM card)

One possible way is to enable airplane mode, but I think it is not the correct approach.

 Settings.System.putString(Context.getContentResolver(),
                                Settings.System.AIRPLANE_MODE_RADIOS,
                                "cell");
      Settings.System.putInt(Context.getContentResolver(),
                             Settings.System.AIRPLANE_MODE_ON, 1);

Thanks!

like image 980
Rohit Avatar asked Nov 10 '22 14:11

Rohit


1 Answers

If your device supports scanning neighbouring cells, this will force it temporarily off the current network.
From various questions posted on Stack Overflow, this seems not to be supported on many Android devices though. For example this question.
Also, it takes time while the device scans all networks.

Depending upon the device manufacturer, there are also various AT commands that re-set devices. As far as I know, these would be manufacturer-specific though, and can sometimes also require PIN entry after the reset.

You could also do it by changing the bearer preference and changing it back again, but this would probably take longer than aeroplane mode.

If going briefly into aeroplane mode works, just use it.

like image 130
user1725145 Avatar answered Nov 14 '22 22:11

user1725145