0

so I need to find out if the user is using roaming and I'm having trouble with phones with multiple SIM cards. My problem occurs when they have 1 sim card that's not roaming and 1 sim card that is roaming then TelephonyManager isNetworkRoaming returns false. I'd like it to return true if even 1 of the cards is roaming. Any idea how to do this?

This is my code

 boolean isRoaming = false;
 TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
 if (telephonyManager != null) 
 {
    isRoaming = telephonyManager.isNetworkRoaming();
 }

I'm getting false if 1 of the cards is roaming.

mp19975558
  • 21
  • 3

0 Answers0