Carrier custom application

987 Views Asked by At

I need to create an Android application to set carrier configuration(VoLte e.g.). The application should fetch configs from our Back-End and apply them on the phone.

In Android documentation I found the following article: This article says, that I can create my own application and override 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;
}

}

I created an app with this service, but the method onLoadConfig(CarrierIdentifier id) is never called by the system.

So what I want from the system to call my overridden method, not system's. What should I do?

1

There are 1 best solutions below

2
kabadisha On

I found your question when researching how to do something similar.

In the article you linked it says:

The carrier app in question must be signed with the same certificate found on the SIM card, as documented in UICC Carrier Privileges.

Since we can't get the certificate from your carrier (they will never give it to you) I think we can't implement our own flavour sadly :-(