InTheHand.AndroidActivity 1.0.5

Prefix Reserved
dotnet add package InTheHand.AndroidActivity --version 1.0.5
                    
NuGet\Install-Package InTheHand.AndroidActivity -Version 1.0.5
                    
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.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="InTheHand.AndroidActivity" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="InTheHand.AndroidActivity" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add InTheHand.AndroidActivity --version 1.0.5
                    
#r "nuget: InTheHand.AndroidActivity, 1.0.5"
                    
#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.
#:package InTheHand.AndroidActivity@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=InTheHand.AndroidActivity&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=InTheHand.AndroidActivity&version=1.0.5
                    
Install as a Cake Tool

InTheHand.AndroidActivity

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

Usage

The library is only required on Android, but can be used by cross-platform libraries such as 32feet.NET in Xamarin or .NET MAUI projects. You need to set the CurrentActivity by assigning it inside your platform-specific MainActivity.cs or similar.

Supported Frameworks

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

Set the current Activity in your MainActivity 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 net8.0-android34.0 is compatible.  net9.0-android was computed.  net10.0-android was computed. 
MonoAndroid monoandroid11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • MonoAndroid 11.0

    • No dependencies.
  • net8.0-android34.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 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.

InTheHand.Nfc

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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 9,779 4/15/2025
1.0.4 66,469 8/10/2023
1.0.3 1,197 5/29/2023
1.0.1 7,795 3/3/2023

.NET 8.0 Update