Search code examples
androidmicrosoft-translator

I am using Microsoft translator local sdk in my app for offline text to text translation, its not working in android kitkat


int result = Translator.start(mContext, new Translator.ServiceListener() {
.....
}

it return ERROR_APP_MISSING_SIGNATURE = 51; in kitkat, but its work fine in marshmallow and later android api versions


Solution

  • Looks like KitKat is returning multiple signatures, and the local sdk is only expecting one signature. you can fix by changing the check in checkAppSignature() method of TranslatorImpl.java to:

    if (packageInfo == null || packageInfo.signatures == null || packageInfo.signatures.length == 0) {

    I will look into updating GitHub with the fix.