キャリア構成を設定する Android アプリケーションを作成する必要があります (VoLte など)。アプリケーションは、バックエンドから構成を取得し、電話に適用する必要があります。
Android のドキュメントで、次の記事を見つけましたCarrierService
。
public class SampleCarrierConfigService extends CarrierService {
private static final String TAG = "SampleCarrierConfigService";
public SampleCarrierConfigService() {
Log.d(TAG, "Service created");
}
@Override
public PersistableBundle onLoadConfig(CarrierIdentifier id) {
Log.d(TAG, "Config being fetched");
PersistableBundle config = new PersistableBundle();
config.putBoolean(
CarrierConfigManager.KEY_CARRIER_VOLTE_AVAILABLE_BOOL, true);
config.putBoolean(
CarrierConfigManager.KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL, false);
config.putInt(CarrierConfigManager.KEY_VOLTE_REPLACEMENT_RAT_INT, 6);
// Check CarrierIdentifier and add more config if needed…
return config;
}
}
このサービスを使用してアプリを作成しましたがonLoadConfig(CarrierIdentifier id)
、システムによってメソッドが呼び出されません。
したがって、システムからではなく、オーバーライドされたメソッドをシステムから呼び出す必要があります。私は何をすべきか?