CHD.HWBackButtonManager 1.0.1

Install-Package CHD.HWBackButtonManager -Version 1.0.1
dotnet add package CHD.HWBackButtonManager --version 1.0.1
<PackageReference Include="CHD.HWBackButtonManager" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CHD.HWBackButtonManager --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CHD.HWBackButtonManager, 1.0.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install CHD.HWBackButtonManager as a Cake Addin
#addin nuget:?package=CHD.HWBackButtonManager&version=1.0.1

// Install CHD.HWBackButtonManager as a Cake Tool
#tool nuget:?package=CHD.HWBackButtonManager&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Usage:

On your pcl project page:

protected override void OnAppearing()
    {
        base.OnAppearing();

        bool OnBackButtonPressed()
        {
            return false;
        }

        HWBackButtonManager.OnBackButtonPressedDelegate onBackButtonPressedDelegate = new HWBackButtonManager.OnBackButtonPressedDelegate(OnBackButtonPressed);

        HWBackButtonManager.Instance.SetHWBackButtonListener(onBackButtonPressedDelegate);
     

    }



    protected override void OnDisappearing()
    {
        base.OnDisappearing();
        HWBackButtonManager.Instance.RemoveHWBackButtonListener();
    }

On your andriod MainActivity:

    public override void OnBackPressed()
    {


        if (!CHD.HWBackButtonManager.Instance.NotifyHWBackButtonPressed()){
            return;
        }

        base.OnBackPressed();
    }
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 649 2/24/2019