- Home /
Unity Android Flurry error
using UnityEngine;
using System;
using System.Collections;
using System.IO;
using System.Collections.Generic;
using System.Linq;
public class FlurryManager : MonoBehaviour {
public FlurryAgent _flurry;
void Start () {
_flurry = new FlurryAgent();
_flurry.onStartSession ("VRBZ2Y3B7235HQ7WQC9Y");
_flurry.logEvent("something");
_flurry.onPageView();
}
public void OnApplicationQuit(){
_flurry.onEndSession();
}
// Update is called once per frame
void Update () {
_flurry.logEvent("somethinggg");
_flurry.onPageView();
}
void OnGUI(){
}
}
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.Grupa2.RocketThruster" android:theme="@android:style/Theme.NoTitleBar" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false">
<activity android:name="com.flurry.android.FlurryAgent" android:configChanges="keyboardHidden|orientation" />
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="landscape">
<activity android:name="com.flurry.android.FlurryAgent" android:configChanges="keyboardHidden|orientation" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
</activity>
</application>
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.hardware.touchscreen" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</manifest>
I only recieve information that the session occured but there are no events displayed. I have FlurryAgent.cs FlurryAgent.jar and manifest in Plugins/Android. I got an error "NullReferenceException: Object reference not set to an instance of an object" referencing to lines in onApplicationQuit and Update functions.
Comment
Answer by MR-01 · Feb 09, 2019 at 08:51 AM
Hi there, kubas1242. can you please tell me where did you add the script to initialize the Flurry SDK in your project?
Your answer
