Where can I add google-services.json in xamarin app

Hi, we are developing a Xamarin application in which we want to track how many people installed the application from our referral identifier.

I find this document https://developers.google.com/analytics/devguides/collection/android/v4/, where it says: "Copy the just downloaded google-services.json file into the app / or mobile / directory of your Android. Studio project. "

I have a visual studio project (2013), where these folders are, of course, missing. The question is, where do I add the google-services.json file to the Visual Studio project?

thanks in advance

+10
c # google-play-services xamarin xamarin.android
source share
3 answers

I do not think the file is needed for Xamarin projects.

-4
source share

I do not know when it became necessary, but since I publish it (in May 2017), it is necessary. I placed mine in the same directory as my Android .csproj file. Then I added it to the project and made sure that Xamarin.GooglePlayServices.Base.targets is in my .csproj . I read that recovery will be enough to create the correct build action, but creating and restarting XS is what I did for me. The end result of my .csproj was this:

 <ItemGroup> <GoogleServicesJson Include="google-services.json" /> </ItemGroup> 
+16
source share
  1. Copy google-services.json into the Droid folder of your solution.
  2. Go to Solution Explorer and right-click the Droid project β†’ Add β†’ Existing item (it will be added to the solution).
  3. Right click on google-services.json and go to properties
  4. In the Properties panel, set the Create option to GoogleServicesJson.
0
source share

All Articles