0

我目前正在尝试记录单个数据实例,只是查看用户是否在佛罗里达州。但是,Flurry 没有在服务器端获取数据。我对 Flurry 很陌生,这是我第一次使用分析并将数据发送到另一台服务器。有人可以帮我找到问题的根源吗?

需要注意的是:当我调用 FlurryAgent.onStartSession(this,"myid") -> 我的 id 在我的代码中时,我只是不想在这里公开。此外,该应用程序目前已上架,并且在 Flurry 中将 Android Market ID 设置为应用程序的包名称。清单包括 Flurry 的 INTERNET 和 NETWORK STATE 权限

这是我正在处理的活动生命周期内所有 Flurry 相关数据的 LogCat:

10-18 13:49:04.997: V/FLURRY(10471): Loggin Version name and sending to Flurry
10-18 13:49:05.017: V/FLURRY(10471): Flurry is starting
10-18 13:49:05.017: I/FlurryAgent(10471): initSettings, CrashReportingEnabled = true
10-18 13:49:05.017: I/FlurryAgent(10471): initSettings, VersionName = 1.10.17.13
10-18 13:49:05.027: I/FlurryAgent(10471): initSettings, LocationCriteria = null
10-18 13:49:05.027: I/FlurryAgent(10471): initSettings, ReportLocation = true
10-18 13:49:05.037: I/FlurryAgent(10471): initSettings, UseHttps = false
10-18 13:49:05.037: I/FlurryAgent(10471): initSettings, ReportUrl = null
10-18 13:49:05.047: I/FlurryAgent(10471): Location provider subscribed
10-18 13:49:05.047: I/FlurryAgent(10471): Initializing new Flurry session
10-18 13:49:05.077: W/FlurryAgent(10471): Agent cache file doesn't exist.
10-18 13:49:05.077: I/FlurryAgent(10471): initSettings, Gender = -1
10-18 13:49:05.077: I/FlurryAgent(10471): No more reports to send.
10-18 13:49:05.077: I/FlurryAgent(10471): initSettings, UserId = 
10-18 13:49:05.077: I/FlurryAgent(10471): initSettings, LogEvents = true
10-18 13:49:05.077: I/FlurryAgent(10471): initSettings, BirthDate = 0
10-18 13:49:05.077: I/FlurryAgent(10471): initSettings, ContinueSessionMillis = 10000
10-18 13:49:05.077: W/FlurryAgent(10471): Start session
10-18 13:49:05.087: I/FlurryAgent(10471): Agent cache file doesn't exist.
10-18 13:49:05.087: D/FlurryAgent(10471): Referrer file Name if it exists:  /data/data/edu.fsu.cs.mobile.quitandbefree/files/.flurryinstallreceiver.
10-18 13:49:05.087: D/FlurryAgent(10471): generating agent report
10-18 13:49:05.087: I/FlurryAgent(10471): getAgentVersion() = 151
10-18 13:49:05.087: D/FlurryAgent(10471): refMapSize is:  0
10-18 13:49:05.087: D/FlurryAgent(10471): Referrer file Name if it exists:  /data/data/edu.fsu.cs.mobile.quitandbefree/files/.flurryinstallreceiver.
10-18 13:49:05.087: D/FlurryAgent(10471): after loading referrer file:  
10-18 13:49:05.087: D/FlurryAgent(10471): optionsMapSize is:  0
10-18 13:49:05.087: D/FlurryAgent(10471): generated report of size 257 with 0 reports.
10-18 13:49:05.097: I/FlurryAgent(10471): getAgentVersion() = 151
10-18 13:49:05.097: I/FlurryAgent(10471): Writing FlurryDataSenderBlockInfo: /data/data/edu.fsu.cs.mobile.quitandbefree/files/.flurrydatasenderblock.bcf8836e-b98d-437c-8804-9b33391f4cf7
10-18 13:49:05.097: I/FlurryAgent(10471): addBlockInfo
10-18 13:49:05.097: I/FlurryAgent(10471): New Data Key
10-18 13:49:05.097: I/FlurryAgent(10471): write iter 0 dataLength = 36
10-18 13:49:05.097: I/FlurryAgent(10471): write iter 0 dataLength = 29
10-18 13:49:05.147: E/FlurryAgent(10471): java.lang.NullPointerException
10-18 13:49:05.147: E/FlurryAgent(10471):   at com.flurry.android.monolithic.sdk.impl.iw.a(SourceFile:24)
10-18 13:49:05.147: E/FlurryAgent(10471):   at com.flurry.android.monolithic.sdk.impl.fb.v(SourceFile:630)
10-18 13:49:05.147: E/FlurryAgent(10471):   at com.flurry.android.monolithic.sdk.impl.fb.c(SourceFile:614)
10-18 13:49:05.147: E/FlurryAgent(10471):   at com.flurry.android.monolithic.sdk.impl.fb.a(SourceFile:311)
10-18 13:49:05.147: E/FlurryAgent(10471):   at com.flurry.android.monolithic.sdk.impl.fb.b(SourceFile:57)
10-18 13:49:05.147: E/FlurryAgent(10471):   at com.flurry.android.monolithic.sdk.impl.fc.a(SourceFile:272)
10-18 13:49:05.147: E/FlurryAgent(10471):   at com.flurry.android.monolithic.sdk.impl.jf.run(SourceFile:49)
10-18 13:49:05.147: E/FlurryAgent(10471):   at android.os.Handler.handleCallback(Handler.java:587)
10-18 13:49:05.147: E/FlurryAgent(10471):   at android.os.Handler.dispatchMessage(Handler.java:92)
10-18 13:49:05.147: E/FlurryAgent(10471):   at android.os.Looper.loop(Looper.java:150)
10-18 13:49:05.147: E/FlurryAgent(10471):   at android.os.HandlerThread.run(HandlerThread.java:60)
10-18 13:49:05.147: I/FlurryAgent(10471): Number of not sent blocks = 1
10-18 13:49:05.147: I/FlurryAgent(10471): Reading FlurryDataSenderBlockInfo: /data/data/edu.fsu.cs.mobile.quitandbefree/files/.flurrydatasenderblock.bcf8836e-b98d-437c-8804-9b33391f4cf7
10-18 13:49:05.147: I/FlurryAgent(10471): FlurryDataSender: start upload data with id = bcf8836e-b98d-437c-8804-9b33391f4cf7 to http://data.flurry.com/aap.do
10-18 13:49:05.177: I/FlurryAgent(10471): Location provider subscribed
10-18 13:49:05.187: V/FLURRY(10471): Flurry log is set
10-18 13:49:05.187: V/FLURRY(10471): Checking Florida in ONSTART
10-18 13:49:05.197: W/FlurryAgent(10471): --onServerError bcf8836e-b98d-437c-8804-9b33391f4cf7
10-18 13:51:21.420: V/FLURRY(10471): Checking Florida in ONSTOP
10-18 13:51:21.430: D/FlurryAgent(10471): Event count incremented: Florida
10-18 13:51:21.430: V/FLURRY(10471): WE'RE IN FLORIDA
10-18 13:51:21.430: I/FlurryAgent(10471): Location provider unsubscribed
10-18 13:51:21.440: D/FlurryAgent(10471): Attempting to persist AdLogs
10-18 13:51:21.440: D/FlurryAgent(10471): Attempting to persist FreqCap
10-18 13:51:21.440: W/FlurryAgent(10471): Trying to end session
10-18 13:51:31.440: W/FlurryAgent(10471): Ending session
10-18 13:51:31.450: W/FlurryAgent(10471): LocationProvider is going to be unsubscribed
10-18 13:51:31.450: I/FlurryAgent(10471): Location provider unsubscribed
10-18 13:51:31.450: I/FlurryAgent(10471): LocationProvider stoped
10-18 13:51:31.450: I/FlurryAgent(10471): provider = null
10-18 13:51:31.450: I/FlurryAgent(10471): getLocation() = null
10-18 13:51:31.470: E/FlurryAgent(10471): java.lang.NullPointerException
10-18 13:51:31.470: E/FlurryAgent(10471):   at com.flurry.android.monolithic.sdk.impl.iw.a(SourceFile:24)
10-18 13:51:31.470: E/FlurryAgent(10471):   at com.flurry.android.monolithic.sdk.impl.fb.v(SourceFile:630)
10-18 13:51:31.470: E/FlurryAgent(10471):   at com.flurry.android.monolithic.sdk.impl.fb.d(SourceFile:57)
10-18 13:51:31.470: E/FlurryAgent(10471):   at com.flurry.android.monolithic.sdk.impl.fe.a(SourceFile:389)
10-18 13:51:31.470: E/FlurryAgent(10471):   at com.flurry.android.monolithic.sdk.impl.jf.run(SourceFile:49)
10-18 13:51:31.470: E/FlurryAgent(10471):   at android.os.Handler.handleCallback(Handler.java:587)
10-18 13:51:31.470: E/FlurryAgent(10471):   at android.os.Handler.dispatchMessage(Handler.java:92)
10-18 13:51:31.470: E/FlurryAgent(10471):   at android.os.Looper.loop(Looper.java:150)
10-18 13:51:31.470: E/FlurryAgent(10471):   at android.os.HandlerThread.run(HandlerThread.java:60)

这是该活动的源代码:

package com.myapp.Location

import com.flurry.android.FlurryAgent;

import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.util.Log;    

public class Settings_Settings extends PreferenceActivity {

        //CONSTANTS
        final static long MILLIS_IN_DAY = 86400000;
        final static long MILLIS_IN_HOUR = 3600000;
        final static long MILLIS_IN_MINUTE = 60000;
        //Variables
        long loadedTime;
        int packs;
        float cost;
        long day=0, hour=0, minute=0;


    @SuppressWarnings("deprecation")
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTheme(R.style.SettingsTheme);//CHange theme
        setTitle("Settings");
        addPreferencesFromResource(R.layout.activity_settings__settings);
        setRequestedOrientation(1);//Vertical Screen Orientation
        Log.v("FLURRY","Logging Version name and sending to Flurry");
        FlurryAgent.setVersionName("1.10.17.13");

    }

    @Override
    protected void onStart()
    {
        super.onStart();
        Log.v("FLURRY", "Flurry is starting");
        FlurryAgent.onStartSession(this, "MYID");
        FlurryAgent.setLogEnabled(true);
        FlurryAgent.setLogEvents(true);
        FlurryAgent.setLogLevel(Log.VERBOSE);

        Log.v("FLURRY", "Flurry log is set");
        Log.v("FLURRY","Checking Florida in ONSTART");
        checkFlorida();


    }

    @Override
    protected void onStop()
    {
        super.onStop(); 
        Log.v("FLURRY","Checking Florida in ONSTOP");
        checkFlorida();

        FlurryAgent.onEndSession(this);
    }

    public void checkFlorida(){
        //Load Settings Data
                SharedPreferences mySettingsPrefs = PreferenceManager.getDefaultSharedPreferences(this);
                boolean florida = mySettingsPrefs.getBoolean("preferences_florida", false);

                if(florida == true){
                    FlurryAgent.logEvent("Florida");
                    Log.v("FLURRY", "WE'RE IN FLORIDA");
                }

    }
}
4

0 回答 0