Completata implementazione di versamento materiale a produzione.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package it.integry.honeywellscannerlibrary;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.InstrumentationRegistry;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("it.integry.honeywellscannerlibrary.test", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
6
honeywellscannerlibrary/src/main/AndroidManifest.xml
Normal file
6
honeywellscannerlibrary/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="it.integry.honeywellscannerlibrary">
|
||||
|
||||
<uses-permission android:name="com.honeywell.decode.permission.DECODE" />
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,61 @@
|
||||
package it.integry.honeywellscannerlibrary;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.honeywell.aidc.AidcManager;
|
||||
|
||||
import it.integry.plugins.barcode_base_library.exception.BarcodeAdapterNotFoundException;
|
||||
import it.integry.plugins.barcode_base_library.extension.RunnableArgs;
|
||||
import it.integry.plugins.barcode_base_library.interfaces.BarcodeReaderInterface;
|
||||
import it.integry.plugins.barcode_base_library.model.BarcodeScanDTO;
|
||||
|
||||
public class HoneyWellBarcodeReader implements BarcodeReaderInterface {
|
||||
|
||||
private Context mContext;
|
||||
|
||||
private boolean canGoOn = false;
|
||||
|
||||
public HoneyWellBarcodeReader(Context context) {
|
||||
this.mContext = context;
|
||||
|
||||
AidcManager.create(context, new AidcManager.CreatedCallback() {
|
||||
@Override
|
||||
public void onCreated(AidcManager aidcManager) {
|
||||
canGoOn = true;
|
||||
}
|
||||
});
|
||||
|
||||
while(!canGoOn) {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRightAdapter() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() throws BarcodeAdapterNotFoundException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deinit() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(RunnableArgs<BarcodeScanDTO> onScanSuccessfull, RunnableArgs<Exception> onScanFailed) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAdapterName() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
3
honeywellscannerlibrary/src/main/res/values/strings.xml
Normal file
3
honeywellscannerlibrary/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">honeywellscannerlibrary</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,17 @@
|
||||
package it.integry.honeywellscannerlibrary;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user