How to use new android Play Install Referrer Library in Xamarin Android

Navin Samuel 1 Reputation point
2021-07-01T11:31:10.623+00:00

Install referer broadcast is deprecated. We need to use play referrer API. but to do in Xamarin.

Developer technologies | .NET | Xamarin
{count} votes

1 answer

Sort by: Most helpful
  1. JarvanZhang 23,971 Reputation points
    2021-07-02T09:37:35.413+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Xamarin.Android doesn't provide the related Api. To reference a native Api in Xamarin, you could create a binding library for the project. Download the latest version of Android Install Referrer library, then add the aar file to your Xamarin.Android project. Don't remember to set Build Action for the .aar file to AndroidAarLibrary.

    How to bind an .AAR, please check the doc:
    https://learn.microsoft.com/en-us/xamarin/android/platform/binding-java-library/binding-an-aar

    Best Regards,

    Jarvan Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.