File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed
Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ android {
77 defaultConfig {
88 minSdkVersion 22
99 targetSdkVersion 25
10- versionCode 4
11- versionName " 0.3 .0"
10+ versionCode 5
11+ versionName " 0.4 .0"
1212 testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
1313 }
1414 buildTypes {
Original file line number Diff line number Diff line change 2323
2424public class PrinterService extends AbstractService implements IPrinterServiceWrapper {
2525
26- public static final String UNKNOWN_EXCEPTION_TEXT = "The request to DeviceService failed" ;
26+ public static final String UNKNOWN_EXCEPTION_TEXT = "Request to DeviceService failed" ;
2727
2828 protected volatile Boolean serviceConnected = null ;
2929 protected ru .evotor .devices .commons .IPrinterService service ;
Original file line number Diff line number Diff line change 2323
2424public class ScalesService extends AbstractService implements IScalesServiceWrapper {
2525
26- public static final String UNKNOWN_EXCEPTION_TEXT = "The request to DeviceService failed" ;
26+ public static final String UNKNOWN_EXCEPTION_TEXT = "Request to DeviceService failed" ;
2727
2828 protected Context context ;
2929
Original file line number Diff line number Diff line change @@ -9,18 +9,18 @@ import android.content.IntentFilter
99 * Created by nixan on 28.04.17.
1010 */
1111
12-
1312abstract class BarcodeBroadcastReceiver : BroadcastReceiver () {
1413
1514 override fun onReceive (context : Context ? , intent : Intent ? ) {
1615 intent?.extras?.getString(EXTRA_SCANNED_CODE )?.let { code ->
1716 if (code.isNotEmpty()) {
18- onReceiveBarcode (code)
17+ onBarcodeReceived (code, context )
1918 }
2019 }
2120 }
2221
23- abstract fun onReceiveBarcode (barcode : String )
22+ public abstract fun onBarcodeReceived (barcode : String , context : Context ? )
23+
2424
2525 companion object {
2626
@@ -30,8 +30,15 @@ abstract class BarcodeBroadcastReceiver : BroadcastReceiver() {
3030 @JvmField
3131 public val EXTRA_SCANNED_CODE = " ScannedCode"
3232
33+ @JvmField
34+ public val SENDER_PERMISSION = " ru.evotor.devices.SCANNER_SENDER"
35+
36+ @JvmField
37+ public val RECEIVER_PERMISSION = " ru.evotor.devices.SCANNER_RECEIVER"
38+
3339 @JvmField
3440 public val BARCODE_INTENT_FILTER = IntentFilter (ACTION_SCANNED )
41+
3542 }
3643
3744}
You can’t perform that action at this time.
0 commit comments