datalogic / datalogic-android-sdk

Datalogic Android SDK
12 stars 5 forks source link

Usage with Kotlin? #2

Closed eokorieFA closed 4 years ago

eokorieFA commented 5 years ago

Is it possible to use this with Kotlin by any chance?

jobhh commented 5 years ago

It should work. Kotlin has no problems using Java libraries.

codybrookshear commented 5 years ago

@jobhh is right. we use it internally with Kotlin. We should be posting some sample apps written in Kotlin this summer. I'll reply here once they are posted.

eokorieFA commented 5 years ago

That would be awesome. As I am trying to find a way of using the sdk within a flutter application. To do that I am using the platform channel to attempt to communicate with the sdk itself. But since I need to create the code in a Kotlin file, I cannot quite seem to get it to work. So any code samples you may have on using this library with Kotlin would be greatly appreciated.

ahmetkocadogan commented 5 years ago

@codybrookshear Is there any plan to make a plugin to work with Flutter?

codybrookshear commented 5 years ago

@ahmetkocadogan no plans for Flutter support so far. It would be possible to expose a few of the APIs to Flutter on your own if desired.

https://flutter.dev/docs/development/platform-integration/platform-channels

eokorieFA commented 5 years ago

@codybrookshear I will be looking forward to the examples on using this package with Kotlin. It is a bit of a shame that there won't be any examples on using it with Flutter. But this will be a good learning curve. Just need to figure out how to that into the apis themselves :)

ahmetkocadogan commented 5 years ago

@codybrookshear you are right for flutter platform channels/ plugin development. but, why i choose flutter is, to avoid learning java and native code, to be able to write one code for cross platform development.

I tried to develop a plugin, but i couldn't manage it so far.

If it's easy for datalogic team to develop, please make a flutter plugin. Thanks.

codybrookshear commented 4 years ago

@ahmetkocadogan if there's enough demand for a flutter sdk in the future, we would definitely consider it. we maintain Android (Java/Kotlin), Xamarin and Cordova (for Ionic and Phonegap development) SDKs currently. If you did write your app in flutter, you could still use "keyboard wedge" mode with the scanner if desired.

@eokorieFA our Kotlin samples are now available:

ahmetkocadogan commented 4 years ago

@codybrookshear i finished my app with Xamarin. Thank you for answers and explanations.

eokorieFA commented 4 years ago

@codybrookshear Thank you for supplying the examples. 👍