Closed rganeyev closed 7 years ago
Looks like there is a problem in your AndroidManifest.xml
.
Did you add lines related to AppMetrica? Example is available in Assets/AppMetrica/Plugins/Android/AndroidManifest.xml
Here is my final AndroidManifest.xml (got from decompiled apk). AndroidManifest.xml
<receiver android:enabled="true" android:exported="true" android:name="com.yandex.metrica.MetricaEventHandler">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER"/>
</intent-filter>
</receiver>
<service android:name="com.androidnative.features.notifications.LocalNotificationService"/>
<service android:enabled="true" android:exported="true" android:name="com.yandex.metrica.MetricaService" android:process=":Metrica">
<intent-filter>
<action android:name="com.yandex.metrica.IMetricaService"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<meta-data android:name="metrica:api:level" android:value="52"/>
</service>
As you see, needed service and receiver are declared in the manifest. Is it ok? Any thoughts?
I can't find <data>
section in your MetricaService intent filter.
Look at this line:
https://github.com/yandexmobile/metrica-plugin-unity/blob/master/YandexMetricaPluginSample/Assets/AppMetrica/Plugins/Android/AndroidManifest.xml#L33
So, system can't find service, that can handle data with scheme "metrica".
dat=metrica://com.smmpartizan.airborneracer
Yep, that was a problem. Everything works like a charm.
Thank you!
I'm glad to hear it. You're welcome!
I integrated Appmetrica according to the documentation.
In the android game, nothing is being sent to the server. It looks like I did not send any data, a fresh empty project without any user. I double checked API key, it is correct.
YandexAppMetricaAndroid class is being initialized, metricaClass inside it is not null.
Here what I have in the adb logcat: