ZXing QR scanner.

Hey all,

Is there somebody who knows how to get the result from the scan(a url), straight in the webbrowser?

Thanks in advance

Posts

  • yanniekyanniek USMember

    Nobody?

  • moljacmoljac HRBeta ✭✭✭

    Straight? Sorry, but I'm not aware of such feature.

    ZXing will return string and if that is url create WebView/UIWebView/WebBrowser and set url for control/widget/view. 2 (3) steps at most.

    cheers

    m

  • yanniekyanniek USMember

    @moljac‌ Sorry! I meant that when the qr image is scanned, you go directly to the website, image etc. Is there any code available for that? Or does anybody know how to do it?

    Thanks!

  • moljacmoljac HRBeta ✭✭✭

    No problems, no need to be sorry.

    I have used ZXing, but not for browsing. I can look in my code and adapt it, but this will take few days.

  • yanniekyanniek USMember

    If you would like to do that!! Very nice of you!

  • yanniekyanniek USMember
    edited March 2014

    I allready got the solution!

    void HandleScanResult (ZXing.Result result)
    {
    string msg = "";
    if (result != null && !string.IsNullOrEmpty (result.Text)) {

                //msg = "Found Barcode: " + result;
    
                string test = result.Text;
    
                var uri = Android.Net.Uri.Parse(test);
    
                var intent = new Intent (Intent.ActionView, uri);
                StartActivity (intent);
    
    
            } else {
    
                msg = "Scanning Canceled!";
            }
            this.RunOnUiThread(() => Toast.MakeText(this, msg, ToastLength.Short).Show());
        }
    

    Standard code, but now it's going directly to the webbrowser with a scanned result! Thanks for your help @moljac‌

  • crysscryss Member ✭✭

    Hola podrías compartir tu trabajo en github?? necesito exactamente lo mismo !!

Sign In or Register to comment.