Skip to content

forestb/levelup-qr-code-listener

Repository files navigation

LevelUp QR Code Listener

Description

The goal of this project was to create a headless listener that was capable of intercepting and identifying LevelUp QR codes on Win32 machines regardless of which Windows application had focus.

I've included two sample applications, since the contexts are a bit different.

The first application is a simple, templated console application that consumes the library (see usage).

The second application is a simple, templated Winforms application which also consumes the library.

The library wraps the unmanaged Windows API. By intercepting key strokes, we can detect whether or not a LevelUp QR code was scanned, extract that QR code, and pass it back to the consumer of this library via delegate method.

Table of Contents

Installation

This library is not (yet) available as a NuGet package; references must be added manually: Project -> Add -> Reference.

Usage

class Program
{
    static void Main(string[] args)
    {
        using (var listener = LevelUpQrCodeListener.Instance)
        {
            listener.StartListener(LevelUpPaymentTokenFound);

            Application.Run();

            listener.StopListener();
        }
    }
    
    private static void LevelUpPaymentTokenFound(string levelUpPaymentToken)
    {
        Console.WriteLine($"LevelUp QR code found: {levelUpPaymentToken}");
    }
}

Contributing

N/A

Credits

N/A

License

This project is licensed under the MIT license.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages