Android AppCenter in-app update not installed

  android, java, visual-studio-app-center

I need to implement automatic updates for my app and since we don’t use google play the decision was to use AppCenter.

I have enforced the update for a new public release, but when it downloads the update and starts the installation it shows the "App not installed" message.

Looking the logcat file, I have not found any exceptions or anything that could give me hint on what is going on. Also I have disabled Play Protect.

My BaseActivity has this piece of code in the beggining of the onCreate() method:

 Distribute.setEnabledForDebuggableBuild(true);

 AppCenter.setLogLevel(Log.VERBOSE);
 AppCenter.start(getApplication(), APP_CODE, Analytics.class, 
           Crashes.class, Distribute.class);

Also in manifest.xml:

    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

Finally in the main App class onCreate():

    try {
        SSLContext.getInstance("TLSv1.2");
        ProviderInstaller.installIfNeeded(getApplicationContext());

    } catch (NoSuchAlgorithmException e) {
        Log.e("CONTEXT", e.getMessage());
        e.printStackTrace();
    } catch (GooglePlayServicesNotAvailableException e) {
        e.printStackTrace();
    } catch (GooglePlayServicesRepairableException e) {
        e.printStackTrace();
    }

Does anyone know if I am missing something?

Source: Android Questions

LEAVE A COMMENT