Very cool. Thanks for sharing.
On Oct 19, 2011 6:37 PM, "Steve Sharrock" <[email protected]> wrote:
> **
> I don't know if anyone has tried to scan barcodes via MonoDoid yet; but,
> I've been dreading (and putting off) digging into some native Java libraries
> to accomplish this. By simply installing the ZXing barcode scanner app, I
> was able to fire off a simple intent that opens a camera view and returns
> when it finds a barcode -- decoded into a string. So, if you need barcode
> scanning...
>
> Intent intent = new Intent( "com.google.zxing.client.android.SCAN" );
> intent.SetPackage( "com.google.zxing.client.android" );
> StartActivityForResult( intent, ScannerID );
>
> ....
>
> protected override void OnActivityResult( int requestCode, ResultresultCode,
> Intent data )
> {
> base.OnActivityResult( requestCode, resultCode, data );
> switch( requestCode )
> {
> case ScannerID:
> if ( resultCode == Result.Ok )
> scannedString = data.GetStringExtra( "SCAN_RESULT");
> ...
>
>
> *Steve Sharrock*
> Architecture/Design/Programming
> www.sharkcode.com
>
>
> _______________________________________________
> Monodroid mailing list
> [email protected]
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid