Search code examples
androidhuawei-mobile-serviceshuawei-developers

Huawei Crash Service is not working in when crash happens in my Service


the application I am developing right now is multiprocessed.

If an crash occurs on another screen after calling AGConnectCrash.getInstance from Main Activity, everything works normally, but if crash happens in the service, the crash is not recognized by the crash service, I cannot get any log or etc.

Is this because Crash Kit doesn't support multiprocessed applications?

Or does Crash Kit not support crashes in the service?

Any advice?


Solution

  • Instead of Activity, can you please add your initialization code to the Application

    if (AGConnectInstance.getInstance() == null) 
    {    
        AGConnectInstance.initialize(getApplicationContext());
    }
    

    Also please kindly check if the crash is related with JAVA or NDK.

    Please use the latest version 1.4.0.300 if it's a NDK crash.