For an android app development i want to check the specific condition whether the Volte is enable or not in OS 13

53 views Asked by At

I am using the below code to check Volte is enable or not it's working fine in all OS but not working for Android 13.

I want to check Volte is enable or not for android 13 . for android 13 it is always return false but the Volte in enable.

Code is :

public boolean isVolteEnable(Context context){
    TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
    boolean isVolteEnable = false;
    try {
        Method method = telephonyManager.getClass().getMethod("isVolteAvailable");
        isVolteEnable = (boolean) method.invoke(telephonyManager);
    } catch (Exception exception) {
        logger.e(exception);
    }
    return isVolteEnable;
}
0

There are 0 answers