Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/zebra_datawedge/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@


## 1.3.1

* fixed plugin crashing on android from sdk 33

## 1.3.0

* updated android sdk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package com.icapps.zebra

import android.app.Activity
import android.content.*
import android.os.Build
import android.content.Context
import android.content.ContentValues.TAG
import android.database.Cursor
import android.net.Uri
Expand Down Expand Up @@ -44,7 +46,17 @@ class DataWedgeInterface(private val appContext: Context) : BroadcastReceiver()
val filter = IntentFilter()
filter.addAction(INTENT_ACTION_RESULT_ACTION)
filter.addCategory(Intent.CATEGORY_DEFAULT)
appContext.registerReceiver(this, filter)

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
appContext.registerReceiver(
this,
filter,
Context.RECEIVER_EXPORTED
)
} else {
@Suppress("DEPRECATION")
appContext.registerReceiver(this, filter)
}
}

fun destroy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.icapps.zebra
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.os.Build
import androidx.annotation.NonNull
import com.icapps.architecture.arch.ObservableFuture
import com.icapps.architecture.arch.asObservable
Expand Down Expand Up @@ -116,7 +117,16 @@ class ZebraPlugin : FlutterPlugin, MethodCallHandler, EventChannel.StreamHandler

override fun onListen(arguments: Any?, events: EventChannel.EventSink) {
broadcastReceivers += ScanIntentHandler(events).also {
appContext.registerReceiver(it, intentFilter)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
appContext.registerReceiver(
it,
intentFilter,
Context.RECEIVER_EXPORTED
)
} else {
@Suppress("DEPRECATION")
appContext.registerReceiver(it, intentFilter)
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/zebra_datawedge/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: combined_barcode_scanner_zebra
description: Combined Barcode scanner package that interfaces with zebra scanners
version: 1.3.0
version: 1.3.1
homepage: https://github.com/icapps/combined_barcode_scanner
repository: https://github.com/icapps/combined_barcode_scanner

Expand Down