Is there any way to set a mobile network in Android?

Viewed 23

I'm wondering, is there possibly a way to get a list of available mobile networks in Android? Like the one that appears in "Settings > SIM cards & mobile networks > SIM Card Settings > Mobile Networks" when automatically network selection is deactivated. And, if this is possible, select one of these networks as preferred.

I've been testing on a rooted device where can convert my app into system app and grant MODIFY_PHONE_STATE permission.

1 Answers

I believe there's no public API to do that...

That settings menu triggers a request to RIL/Modem to list all available networks. Then, if the user selects any network, a new request is sent to RIL/Modem to manually move to the desired network (after this moment, the network selection is no longer automatic).

I believe every Android vendor implements internal APIs to allow this kind of communication between the AP (application side) with BP (Baseband/Modem side). However, those APIs are not public and it is probably different for each vendor (Samsung, Motorola, etc...)

Related