InTheHand.AndroidActivity 1.0.3

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package InTheHand.AndroidActivity --version 1.0.3                
NuGet\Install-Package InTheHand.AndroidActivity -Version 1.0.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="InTheHand.AndroidActivity" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add InTheHand.AndroidActivity --version 1.0.3                
#r "nuget: InTheHand.AndroidActivity, 1.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install InTheHand.AndroidActivity as a Cake Addin
#addin nuget:?package=InTheHand.AndroidActivity&version=1.0.3

// Install InTheHand.AndroidActivity as a Cake Tool
#tool nuget:?package=InTheHand.AndroidActivity&version=1.0.3                

InTheHand.AndroidActivity

Provides a mechanism to determine the main activity in cross-platform projects

Usage

In your cross-platform code you can reference this package. Query the AndroidActivity.CurrentActivity property to return the current activity on supported cross-platform frameworks.

On unsupported frameworks you can manually set the CurrentActivity by assigning it inside your platform-specific MainActivity.cs or similar.

Supported Frameworks

  • Xamarin Forms
  • .NET MAUI
  • Uno Platform

Other Frameworks

  • Avalonia UI
  • Xamarin Android
  • .NET Android (non-MAUI)

Set the current Activity manually in the main OnCreate method:-

protected override void OnCreate(Bundle savedInstanceState)
{
   // provide reference to current activity
   InTheHand.AndroidActivity.CurrentActivity = this;

   base.OnCreate(savedInstanceState);
}

Nuget (with prereleases)

Product Compatible and additional computed target framework versions.
.NET net6.0-android31.0 is compatible.  net7.0-android was computed.  net7.0-android33.0 is compatible.  net8.0-android was computed. 
MonoAndroid monoandroid10.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • MonoAndroid 10.0

    • No dependencies.
  • net6.0-android31.0

    • No dependencies.
  • net7.0-android33.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on InTheHand.AndroidActivity:

Package Downloads
InTheHand.Net.Bluetooth

32feet.NET is an open-source project to make personal area networking technologies such as Bluetooth easily accessible from .NET code.

InTheHand.BluetoothLE

32feet.NET is an open-source project to make personal area networking technologies such as Bluetooth easily accessible from .NET code.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on InTheHand.AndroidActivity:

Repository Stars
inthehand/32feet
Personal Area Networking for .NET. Open source and professionally supported
Version Downloads Last updated
1.0.4 11,787 8/10/2023
1.0.3 953 5/29/2023
1.0.1 5,531 3/3/2023

Addressing issues with exception in release build