question

AnkitGandhi-4018 avatar image
0 Votes"
AnkitGandhi-4018 asked RobCaplan edited

Does Xamarin forms supports Play Install Referrer API(xamarin android)

We have use INSTALL_REFERRER in xamarin android to support deferred deeplink and created BroadcastReceiver, however as per google developer documentation above one is deprecated (https://android-developers.googleblog.com/2019/11/still-using-installbroadcast-switch-to.html) from March 1, 2020 and new api "Play Install Referrer API" (https://developer.android.com/google/play/installreferrer/library.html#kts) related stuff not able to find in my xamarin solution so does it support or any nuget need to install ?

If not, then what is alternative to support new api.

Thanks & Regards,
Ankit

dotnet-xamarin
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It looks like someone made a binding for the library -> https://www.nuget.org/packages/Xamarin.Android.Binding.InstallReferrer/ however I am not sure how new it is. You may want to look at just binding it yourself if that version doesn't fit what you need -> https://docs.microsoft.com/xamarin/android/platform/binding-java-library/?WT.mc_id=friends-0000-jamont

0 Votes 0 ·

@JamesMontemagno ,

So It means that Xamarin right now not supporting "Play Install Referrer API" ? and have to find alternatives?

0 Votes 0 ·

Hi, AnkitGandhi-4018. The Referrer Library is a native api which cannot be used in Xamarin.Android directly. Instead, you could seek for a nuget or create a binding library yourself as James said. Please try the nuget James provides to check if it meets your need. If not, try create a binding library. Here is the related doc, you could refer to: https://docs.microsoft.com/en-us/xamarin/android/platform/binding-java-library/binding-an-aar

0 Votes 0 ·

0 Answers