android Outbound caller id - on/off

前端 未结 5 1442
广开言路
广开言路 2021-01-06 20:44

I wan to hide/show my caller id from my activity programmatically. I tried to find it in the android documentation but without the luck. Maybe you have any ideas?

5条回答
  •  再見小時候
    2021-01-06 21:25

    I have managed to get Additional call settings dialog. Explanation below:

    Although it looks like it is part of the Settings, in fact it is part of the Native PhoneApp. If you take a look at the AndroidManifest.xml of the PhoneApp you will see that Activity GsmUmtsAdditionalCallOptions has defined IntentFilter for the android.intent.action.MAIN.

    So, the code that I checked to work correctly on several phones:

    Intent additionalCallSettingsIntent = new Intent("android.intent.action.MAIN");
    ComponentName distantActivity = new ComponentName("com.android.phone", "com.android.phone.GsmUmtsAdditionalCallOptions");
    additionalCallSettingsIntent.setComponent(distantActivity);
    startActivity(additionalCallSettingsIntent);
    

提交回复
热议问题