1

I have an app I built using the Android ML Kit. It compiles and runs fine on most devices, however, I am trying to build a version for a tablet running 4.4.4 SDK 19 and even with the config set as following:

compileSdkVersion 28
defaultConfig {
    applicationId "com.google.firebase.samples.apps.mlkit"
    minSdkVersion 19
    targetSdkVersion 28
    versionName '1.0.4'
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

the app compiles and runs on the device but the camera livepreview screen is black. I was able to install and have camera operate once a couple weeks ago by setting the targetSdkVersion to 19, but now android is saying I need to be 26> for play store and won't let me.

This app is not intended to be released to play store and is a barcode scanner app to check in volunteers by scanning their bar code on a ID card.

How can I trouble shoot this? Can I override the 26> SDK for play store requirement in Android Studio?

So strange because it was able to run okay previously. Granted I made some changes another class in the project but that activity runs fine, just the bar code scanner camera is not connecting to the camera and starting the livepreview image processing when that activity is launched.

1 Answer 1

0

Issue resolved.

While the app ran fine without this change on phones, three separate tablets running different android OS would fail to load a createCameraSource using the FACE_COUNTOUR parameter.

commenting out an adding the following in the livePreviewActivity resolved the issue

// private String selectedModel = FACE_CONTOUR;
private String selectedModel = BARCODE_DETECTION;

Hope that helps someone out there...

Thanks

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .