Xamarin-FiveStarsRate 4.1.0

dotnet add package Xamarin-FiveStarsRate --version 4.1.0                
NuGet\Install-Package Xamarin-FiveStarsRate -Version 4.1.0                
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="Xamarin-FiveStarsRate" Version="4.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xamarin-FiveStarsRate --version 4.1.0                
#r "nuget: Xamarin-FiveStarsRate, 4.1.0"                
#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 Xamarin-FiveStarsRate as a Cake Addin
#addin nuget:?package=Xamarin-FiveStarsRate&version=4.1.0

// Install Xamarin-FiveStarsRate as a Cake Tool
#tool nuget:?package=Xamarin-FiveStarsRate&version=4.1.0                

sponsor me

How to use

To use this library just add this snippet in the OnCreate of your activity.

The ShowAfter(int numbersOfAccess) method tells the library after how many access the dialog has to be shown.

Example:

FiveStarsDialog fiveStarsDialog = new FiveStarsDialog(this, "fede_example@noreply.com");
fiveStarsDialog.SetRateText("Your custom text")
		.SetTitle("Your custom title")
		.SetForceMode(false)
		.SetUpperBound(2)
		.SetNegativeReviewListener(new NegativeReview(this))
		.SetReviewListener(new PositiveReview(this))
		.ShowAfter(0);

public class NegativeReview : Java.Lang.Object, INegativeReviewListener
{
	readonly MainActivity MainActivity;

	public NegativeReview(MainActivity mainActivity)
	{
		MainActivity = mainActivity;
	}

	public void OnNegativeReview(int p0)
	{
		Toast.MakeText(MainActivity, $"Negative. Stars {p0}", ToastLength.Short);
	}
}

public class PositiveReview : Java.Lang.Object, IReviewListener
{
	readonly MainActivity MainActivity;

	public PositiveReview(MainActivity mainActivity)
	{
		MainActivity = mainActivity;
	}

	public void OnReview(int p0)
	{
		Toast.MakeText(MainActivity, $"Positive. Stars {p0}", ToastLength.Short);
	}
}

Follow me at:

LinkedIn YouTube Amazon Goodreads Instagram Cyber Prophets Sharing Your Stories
LinkedIn YouTube Amazon Goodreads Instagram RedCircle Podcast RedCircle Podcast
Product Compatible and additional computed target framework versions.
.NET net6.0-android was computed.  net7.0-android was computed.  net8.0-android was computed. 
MonoAndroid monoandroid is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
4.1.0 566 8/31/2020
4.0.0 456 8/10/2020

New modes: setAfterNDaysMode and setInAppReviewMode