HMS-Core / hms-xamarin-bindings

This repo contains all of Xamarin HMS plugins.
https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1
Apache License 2.0
36 stars 11 forks source link

HiAnalyticsInstance.AAID returning null value #3

Closed Kwiyos closed 2 years ago

Kwiyos commented 2 years ago

I've tried to run HiAnalyticsDemo with my own project id and agconnect-services.json and it worked, the event is showing in HMS Console App debugging page. However I can't get it to work on my own project somehow, I've followed the guides step by step and also referencing the codes from HiAnalyticsDemo but its not working.

One thing that I noticed thought, is that the AAID value from HiAnalyticsInstance object is actually null when I try to run it in my project (when I debug from HiAnalyticsDemo its not null) aaid

Any idea what's causing this to happen? Thank in advance

tugcearar commented 2 years ago

Helllo,

Can you please send the detailed output? And also did you use any other HMS or AGC NuGet in your project?

Kwiyos commented 2 years ago

Helllo,

Can you please send the detailed output? And also did you use any other HMS or AGC NuGet in your project?

Hi,

Not sure which output you need and how do I get it

The other NuGet I used are -Huawei.Hms.Safetydetect -Huawei.Hms.Push -Huawei.Agconnect.Crash

tugcearar commented 2 years ago

First, please do following in Visual Studio;

  1. Tools –> Options –>Xamarin
  2. Set the Xamarin Diagnostics output verbosity to Diagnostics

After run the project and getting null to AAID, copy output from the Output window to a txt file and send here please.

Kwiyos commented 2 years ago

First, please do following in Visual Studio;

  1. Tools –> Options –>Xamarin
  2. Set the Xamarin Diagnostics output verbosity to Diagnostics

After run the project and getting null to AAID, copy output from the Output window to a txt file and send here please.

ShowOutputFrom Xamarin Diagnostics.txt

tugcearar commented 2 years ago

First, please do following in Visual Studio;

  1. Tools –> Options –>Xamarin
  2. Set the Xamarin Diagnostics output verbosity to Diagnostics

After run the project and getting null to AAID, copy output from the Output window to a txt file and send here please.

ShowOutputFrom Xamarin Diagnostics.txt

Can you copy and send debug output please?

debug

Kwiyos commented 2 years ago

First, please do following in Visual Studio;

  1. Tools –> Options –>Xamarin
  2. Set the Xamarin Diagnostics output verbosity to Diagnostics

After run the project and getting null to AAID, copy output from the Output window to a txt file and send here please.

ShowOutputFrom Xamarin Diagnostics.txt

Can you copy and send debug output please?

debug

Opps, my bad

Output Debug.txt

There's a lots of stuff in Debug output so I just try to copy what I thought is relevant

tugcearar commented 2 years ago

Hello, I tried with the same plugins in a new application and got the AAID successfully. Did you apply these steps correctly:

Analytics Guide Crash Guide

And also please make sure that you have enabled AndroidManifestMerger.