This is a demo app for the Liftoff (Vungle) 7.1.2 SDK for WPF.

The SDK is the VungleSDKForWPF NuGet package, restored from nuget.org when you build. It brings in
its one dependency, Microsoft.Web.WebView2, for you.

Requirements
  - Windows 10 or 11, .NET 8 or newer (the SDK targets net8.0-windows).
  - The Microsoft Edge WebView2 Runtime on the machine (preinstalled on Windows 11).

To get started, sign up at https://liftoff.io and use the Dashboard to create an Application ID and
some placements.

Run the demo
  1. Open LiftoffWpfDemoApp.csproj in Visual Studio 2022 or newer and run it.
  2. Enter your Application ID and click "Start Vungle". Your placements appear in the list.
  3. Select a placement and click "Load". When an ad is ready, "Play" becomes enabled.
  4. Click "Play". For a rewarded placement, "Reward: earned" appears once the reward is earned.

Using the SDK in your own app
  - Install the package:  dotnet add package VungleSDKForWPF
  - Call LiftoffAds.InitializeAsync once your main window exists (for example from its Loaded
    event), not from App.OnStartup. The SDK uses Application.Current.MainWindow.
  - Ads play over the client area of Application.Current.MainWindow and follow it as it moves and
    resizes. The window must be shown and not minimized when you call PlayAdAsync; otherwise the
    play fails with OnAdPlayFailure.
  - Grant rewards from OnAdPlayRewarded, never from OnAdEnd (which also fires when the user closes
    the ad early). To grant on your server instead, set AdConfig.UserId before playing; Liftoff
    relays it as %user% in the server-to-server rewarded callback.

If you have any questions or comments, please contact us here: https://github.com/Vungle/Windows-SDK/issues/38
