简体   繁体   中英

How to Test EMDK functionality on traditional android Device?

So I've been stuck for a while, scratching my head around, I don't know how to test my application on Emulator or on my testing android device, when I try to run the application it gives an error on installation

09/02 14:17:01: Launching 'app' on Pixel API 24. Installation did not succeed. The application could not be installed: INSTALL_FAILED_MISSING_SHARED_LIBRARY

List of apks: [0] '/home/username/AndroidStudioProjects/projectName/app/build/outputs/apk/debug/app-debug.apk' Installation failed due to: 'null' Retry

Solutions Tried

Stackoverflow Link to the possible solution

After an Intensive search and many failures, I came across a solution which is not a final solution but a workaround for testing EMDK application, during its development phases. It's hard for newbies, but it will make sense if you have prior knowledge of Instrumental Testing using JUNIT.

Instrumented Testing

//  Simulate a barcode being scanned
mockedInterface.AddScanData(“123456789”);
ScanDataCollection scanDataCollection = mockedInterface.ReportScan(success);

Pass Test Data

//  Trigger the data listener
activity.onData(scanDataCollection);

Check credibility of data

 //  Test that the correct data was scanned
onView(withId(R.id.textViewData)).check(matches(withText(”0123456789\n”)));

Github link to sample Project: Github

Link to Original Source: Original Source

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM