InTheHand.AndroidActivity
1.0.4
Prefix Reserved
dotnet add package InTheHand.AndroidActivity --version 1.0.4
NuGet\Install-Package InTheHand.AndroidActivity -Version 1.0.4
<PackageReference Include="InTheHand.AndroidActivity" Version="1.0.4" />
paket add InTheHand.AndroidActivity --version 1.0.4
#r "nuget: InTheHand.AndroidActivity, 1.0.4"
// Install InTheHand.AndroidActivity as a Cake Addin #addin nuget:?package=InTheHand.AndroidActivity&version=1.0.4 // Install InTheHand.AndroidActivity as a Cake Tool #tool nuget:?package=InTheHand.AndroidActivity&version=1.0.4
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);
}
Product | Versions 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 | monoandroid90 is compatible. monoandroid10.0 is compatible. monoandroid11.0 is compatible. |
-
MonoAndroid 10.0
- No dependencies.
-
MonoAndroid 11.0
- No dependencies.
-
MonoAndroid 9.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
|
Improved instructions for MainActivity OnCreate.