Code Monkey home page Code Monkey logo

datawedge-flutter-demo's People

Contributors

darryncampbell avatar mjablecnik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

datawedge-flutter-demo's Issues

communication problems between APP and DataWedge

Hello,

I have this problem :

Restarted application in 2.991ms.

[38;5;248m════════ Exception caught by services library ══════════════════════════════════�[39;49m
[38;5;244mThe following MissingPluginException was thrown while activating platform stream on channel com.example.bacode_scanner_zebra/scan:�[39;49m
MissingPluginException(No implementation found for method listen on channel com.example.bacode_scanner_zebra/scan)

[38;5;244mWhen the exception was thrown, this was the stack�[39;49m
�[38;5;244m#0 MethodChannel._invokeMethod�[39;49m
package:flutter/…/services/platform_channel.dart
�[38;5;244m�[39;49m
�[38;5;244m#1 EventChannel.receiveBroadcastStream.�[39;49m
package:flutter/…/services/platform_channel.dart
[38;5;244m�[39;49m
[38;5;248m════════════════════════════════════════════════════════════════════════════════�[39;49m
E/flutter ( 8996): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method createDataWedgeProfile on channel com.example.bacode_scanner_zebra/command)
[38;5;244mE/flutter ( 8996): #0 MethodChannel._invokeMethod�[39;49m
package:flutter/…/services/platform_channel.dart
E/flutter ( 8996):
[38;5;248mE/flutter ( 8996): #1 _MyHomePageState._createProfile�[39;49m
package:bacode_scanner_zebra/main.dart
E/flutter ( 8996):
E/flutter ( 8996):
I/flutter ( 8996): TAP
I/flutter ( 8996): UNTAP
E/flutter ( 8996): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method sendDataWedgeCommandStringParameter on channel com.example.bacode_scanner_zebra/command)
�[38;5;244mE/flutter ( 8996): #0 MethodChannel._invokeMethod�[39;49m
package:flutter/…/services/platform_channel.dart
E/flutter ( 8996):
�[38;5;248mE/flutter ( 8996): #1 _MyHomePageState._sendDataWedgeCommand�[39;49m
package:bacode_scanner_zebra/main.dart
E/flutter ( 8996):
E/flutter ( 8996):
E/flutter ( 8996): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method sendDataWedgeCommandStringParameter on channel com.example.bacode_scanner_zebra/command)
[38;5;244mE/flutter ( 8996): #0 MethodChannel._invokeMethod�[39;49m
package:flutter/…/services/platform_channel.dart
E/flutter ( 8996):
[38;5;248mE/flutter ( 8996): #1 _MyHomePageState._sendDataWedgeCommand�[39;49m
package:bacode_scanner_zebra/main.dart
E/flutter ( 8996):
E/flutter ( 8996):

Missing unregisterReceiver function

Hello, when I quit your demo application so this error exception is showed:

E/ActivityThread( 5050): Activity com.darryncampbell.datawedgeflutter.MainActivity has leaked IntentReceiver com.darryncampbell.datawedgeflutter.MainActivity$createDataWedgeBroadcastReceiver$1@547c660 that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread( 5050): android.app.IntentReceiverLeaked: Activity com.darryncampbell.datawedgeflutter.MainActivity has leaked IntentReceiver com.darryncampbell.datawedgeflutter.MainActivity$createDataWedgeBroadcastReceiver$1@547c660 that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread( 5050): 	at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:1351)
E/ActivityThread( 5050): 	at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:1132)
E/ActivityThread( 5050): 	at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1421)
E/ActivityThread( 5050): 	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1394)
E/ActivityThread( 5050): 	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1382)
E/ActivityThread( 5050): 	at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:609)
E/ActivityThread( 5050): 	at com.darryncampbell.datawedgeflutter.MainActivity$configureFlutterEngine$1.onListen(MainActivity.kt:38)
E/ActivityThread( 5050): 	at io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler.onListen(EventChannel.java:188)
E/ActivityThread( 5050): 	at io.flutter.plugin.common.EventChannel$IncomingStreamRequestHandler.onMessage(EventChannel.java:167)
E/ActivityThread( 5050): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:84)
E/ActivityThread( 5050): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:865)
E/ActivityThread( 5050): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/ActivityThread( 5050): 	at android.os.MessageQueue.next(MessageQueue.java:325)
E/ActivityThread( 5050): 	at android.os.Looper.loop(Looper.java:142)
E/ActivityThread( 5050): 	at android.app.ActivityThread.main(ActivityThread.java:6494)
E/ActivityThread( 5050): 	at java.lang.reflect.Method.invoke(Native Method)
E/ActivityThread( 5050): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
E/ActivityThread( 5050): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

I understand that there is somewhere missing unregisterReceiver() function which is called for unregister dataWedge.
How can I prevent this error?

Can i use Zebra DataWedge on a non-Zebra android device?

I need to develop an Android application that should receive barcode and RFID scans from the Zebra RFD8500 reader. I don't have an Android Zebra device, just a regular Android.

Can i use DataWedge with this setup?

If not, should i use the Zebra Scanner SDK to get the barcodes and the Zebra RFID SDK to get the RFID reads? Does the Zebra RFID SDK works on non-Zebra Android devices?

Any upgrade on this one?

It's not possilbe to test this DataWedge app.. Any newer ones?

Your Flutter application is created using an older version of the Android
embedding. It is being deprecated in favor of Android embedding v2. Follow the
steps at

Flutter and Symbol/Zebra MC18 Android

Hi!

We are experiencing major problems on the SymbolZebra MC18 in combination with Flutter. We've built apps using DataWedge on MC18 and PS20 devices, but performance on MC18 is terrible, making the device unusable. User presses a button and the app freezes for 2 seconds... We know this is a rather old device with a limited CPU/GPU, but performance is ok, when these lag spikes are gone. We have already filed a issue for it for the Flutter Team (flutter/flutter#71315), but we're wondering...

  • if other people are experiencing the same issue and maybe have a workaround for it
  • if Zebra maybe has a fix for this (seems to be GPU related, see ticket above)

We haven't encountered this bug with native Android development or Xamarin development.

Best regards,

Mark

RFID mode

Hi, I am using this on MC3300. Is there a way for me to switch between the RFID mode and barcode mode?

DataWedge profile not being created

Hello,

I followed the instructions building and loading the app, but it appears the DataWedge profile was not being created.
The app began functioning properly when i manually created the profile using the provided screenshots.

I am vetting using this over react native and doing some hacks with keyboard and input.
Would want auto profile creation for mass deployments.

The device i am testing on is a TC20 DataWedge 6.6.49

Cannot disable Keystroke Output when creating the profile.

Hi,
I have a new MC9300 that comes with Datawedge 8.2.4 and for some reason is acting different than the previous 7.3 version.
I'll try to explain: When my TextField has the focus and I hit the scan trigger, it gets the value on the onEvent function, but right after DataWedge inject the scanned code again, duplicating the code.
Manually I disable the "Keystroke Output" and it seems to help. I'm trying to disable keystroke output at the moment of the profile creating but is not working. Here is my code. Can you help me?

private fun createDataWedgeProfile(profileName: String) {
// Create and configure the DataWedge profile associated with this application
// For readability's sake, I have not defined each of the keys in the DWInterface file
dwInterface.sendCommandString(this, DWInterface.DATAWEDGE_SEND_CREATE_PROFILE, profileName)
val profileConfig = Bundle()
profileConfig.putString("PROFILE_NAME", profileName)
profileConfig.putString("PROFILE_ENABLED", "true") // These are all strings
profileConfig.putString("CONFIG_MODE", "UPDATE")
val barcodeConfig = Bundle()
barcodeConfig.putString("PLUGIN_NAME", "BARCODE")
barcodeConfig.putString("RESET_CONFIG", "true") // This is the default but never hurts to specify
val barcodeProps = Bundle()
barcodeConfig.putBundle("PARAM_LIST", barcodeProps)
profileConfig.putBundle("PLUGIN_CONFIG", barcodeConfig)
val appConfig = Bundle()
appConfig.putString("PACKAGE_NAME", packageName) // Associate the profile with this app
appConfig.putStringArray("ACTIVITY_LIST", arrayOf("*"))
profileConfig.putParcelableArray("APP_LIST", arrayOf(appConfig))
dwInterface.sendCommandBundle(this, DWInterface.DATAWEDGE_SEND_SET_CONFIG, profileConfig)
// You can only configure one plugin at a time in some versions of DW, now do the intent output
profileConfig.remove("PLUGIN_CONFIG")
val intentConfig = Bundle()
intentConfig.putString("PLUGIN_NAME", "INTENT")
intentConfig.putString("RESET_CONFIG", "true")
val intentProps = Bundle()
intentProps.putString("intent_output_enabled", "true")
intentProps.putString("intent_action", PROFILE_INTENT_ACTION)
intentProps.putString("intent_delivery", PROFILE_INTENT_BROADCAST) // "2"
intentConfig.putBundle("PARAM_LIST", intentProps)
profileConfig.putBundle("PLUGIN_CONFIG", intentConfig)

    val keystrokeConfig = Bundle()
    keystrokeConfig.putString("PLUGIN_NAME", "KEYSTROKE")
    keystrokeConfig.putString("RESET_CONFIG", "true")
    val keystrokeProps = Bundle()
    keystrokeProps.putString("keystroke_output_enabled", "false")
    keystrokeConfig.putBundle("PARAM_LIST", keystrokeProps)
    profileConfig.putBundle("PLUGIN_CONFIG", keystrokeConfig)
    dwInterface.sendCommandBundle(this, DWInterface.DATAWEDGE_SEND_SET_CONFIG, profileConfig)

}

Implement "com.symbol.datawedge.api.ENUMERATE_SCANNERS" to get the available scanners

I'd need a quick way to check whether the device is running on has got zebra enabled scanners attached. The ENUMERATE_SCANNERS should do the trick, but I wasn't able to implement it correctly yet.

I tweaked the example code as follows:

private val ENUMERATE_SCANNERS_ACTION = "com.dancam.wings.ENUMERATE_SCANNERS"

...

EventChannel(flutterEngine.dartExecutor, SCAN_CHANNEL).setStreamHandler(
                object : EventChannel.StreamHandler {
                    private var dataWedgeBroadcastReceiver: BroadcastReceiver? = null

                    override fun onListen(arguments: Any?, events: EventChannel.EventSink?) {
                        dataWedgeBroadcastReceiver = createDataWedgeBroadcastReceiver(events)
                        val intentFilter = IntentFilter()
                        intentFilter.addAction(PROFILE_INTENT_ACTION)
                        intentFilter.addAction(ENUMERATE_SCANNERS_ACTION)
                        intentFilter.addAction(DWInterface.DATAWEDGE_RETURN_ACTION)
                        intentFilter.addCategory(DWInterface.DATAWEDGE_RETURN_CATEGORY)
                        registerReceiver(
                                dataWedgeBroadcastReceiver, intentFilter)
                    }

                    override fun onCancel(arguments: Any?) {
                        unregisterReceiver(dataWedgeBroadcastReceiver)
                        dataWedgeBroadcastReceiver = null
                    }
                }
        )

    private fun createDataWedgeBroadcastReceiver(events: EventChannel.EventSink?): BroadcastReceiver? {
        return object : BroadcastReceiver() {
            @SuppressLint("SimpleDateFormat")
            override fun onReceive(context: Context, intent: Intent) {
                if (intent.action.equals(PROFILE_INTENT_ACTION)) {
                    //  A barcode has been scanned
                    val scanData = intent.getStringExtra(DWInterface.DATAWEDGE_SCAN_EXTRA_DATA_STRING)
                    val symbology = intent.getStringExtra(DWInterface.DATAWEDGE_SCAN_EXTRA_LABEL_TYPE)
                    val dateInMillis = System.currentTimeMillis()
                    val df = SimpleDateFormat("dd/MM/yyyy HH:mm:ss")
                    df.timeZone = TimeZone.getTimeZone("UTC")
                    val dateTimeString = df.format(Date(dateInMillis))
                    val currentScan = Scan(scanData!!, symbology!!, dateTimeString)
                    events?.success(currentScan.toJson())
                }

                if (intent.action.equals(ENUMERATE_SCANNERS_ACTION)) {
                    val scannerList = intent.getSerializableExtra("com.symbol.datawedge.api.RESULT_ENUMERATE_SCANNERS") as ArrayList<*>
                    events?.success(scannerList.size)
                }
            }
        }
    }

I was expecting to be able to call

sendDataWedgeCommand("com.symbol.datawedge.api.ENUMERATE_SCANNERS", "");

from the dart/flutter app and get the result.

Has anyone implemented this already, who can lend me a hand? Once I get it to work, it'd be great to create a PR for future reference too!

MissingPluginException according to custom MainActivity.kt

Custom code in MainActivity.kt results in plugin errors. Like barcode_scan, sqflite plugin or path_provider. When I delete the code inside MainActivity(), it works. Any idea how to solve it?

Error messages be like:
MissingPluginException(No implementation found for method requestCameraPermission on channel de.mintware.barcode_scan)

Kotlin register Plugins

Hi,

my problem when i install a plugin (example Cloud Firestore) the plugin is not working/found in the flutter part.

Thanks,
Thomas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.