2013-01-07 43 views
5

में कुछ भी लॉग नहीं करता है मैंने पहले flurry लागू किया है। यह ठीक काम कर रहा था। आज एसडीके के नए संस्करण के साथ, flurry logcat में किसी भी चीज़ को लॉग नहीं करता है।Flurry एंड्रॉइड

मेरे कोड

Flurry.java

public class Flurry { 

private static final String API_KEY = "xxxxxxxxxxxxxxxxxxxxxx"; 
private static Context mContext; 

public static void init(Context c) { 
    mContext = c; 
} 

public static Context getContext() { 
    return mContext; 
} 

public static void onStartSession() { 
    if (mContext != null) { 
     Debug.e("", "startng flurry session..."); 

     FlurryAgent.setUserId(Utils.getUserId(mContext)); 
     FlurryAgent.setVersionName(Utils.getAppVersion(mContext)); 
     FlurryAgent.setLogEnabled(true); 
     FlurryAgent.setLogEvents(true); 
     FlurryAgent.onStartSession(mContext, API_KEY); 
     // FlurryAgent.initializeAds(mContext); 
    } else { 
     Debug.e("", "mContext is null"); 
    } 
} 

public static void onEndSession() { 
    if (mContext != null) { 
     Debug.e("", "ending flurry session..."); 
     FlurryAgent.onEndSession(mContext); 
    } 
} 
} 
गतिविधि में

public class MainActivity extends TabActivity implements OnTabChangeListener { 
/** Called when the activity is first created. */ 

TabHost tabHost; 

public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    requestWindowFeature(Window.FEATURE_NO_TITLE); 
    setContentView(R.layout.main); 
    Flurry.init(this); 
    Flurry.onStartSession();   

    setTabs(); 

} 

@Override 
protected void onDestroy() { 
    Flurry.onEndSession(); 
    super.onDestroy(); 
} 
} 

Manifest.xml में

<uses-permission android:name="android.permission.INTERNET" /> 

जब मैं कार्यान्वित होने से पहले ही मुझे इस तरह लोग इन दिखाने , लेकिन आज im एक और ऐप में प्रसन्नता, मुझे झुकाव का कोई लॉग नहीं मिला ... मुद्दा क्या हो सकता है ??

4359   FlurryAgent D Initializing Flurry session 
4359   FlurryAgent D New session 
4359   TitleActivity V ::onResume:: 
4359    Settings W Setting android_id has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value. 
4359   FlurryAgent I loading persistent data: /data/data/com.xxxxxx/files/.flurryagent.-6ee7b2a3 
    4359   FlurryAgent D Loading API key: ****************xxxx 
4359   FlurryAgent D Loading session reports 
4359   FlurryAgent D Persistent file loaded 
4359   FlurryAgent D generating report 
4359   FlurryAgent D Sending report to: http://data.flurry.com/aap.do 
4359   FlurryAgent D Report successful 
4359   FlurryAgent D Processing report response 
4359   FlurryAgent D Done sending initial agent report 
+0

मुझे किसी भी घटना या सत्र को झुकाव नहीं मिला। –

उत्तर

6

फ़्लोर्री Analytics एसडीके v3.1.0 (फ़्लोररी से इस सप्ताह बनाया और डाउनलोड) का उपयोग करते समय मुझे लॉग संदेश मिलते हैं।

@Override 
protected void onStart() { 
    super.onStart(); 
    FlurryAgent.onStartSession(this, FLURRY_API_KEY); 
    FlurryAgent.setLogEnabled(true); 
    FlurryAgent.setLogEvents(true); 
    FlurryAgent.setLogLevel(Log.VERBOSE); 

} 

@Override 
protected void onStop() { 
    super.onStop(); 
    FlurryAgent.onEndSession(this); 
} 

और यहाँ है सबूत

01-10 11:35:23.310: I/FlurryAgent(3915): loading persistent data: /data/data/com.ader/files/.flurryagent.624f614c 
01-10 11:35:23.310: D/FlurryAgent(3915): Loading API key: ****************RY7Z 
01-10 11:35:23.320: D/FlurryAgent(3915): Loading phoneId: AND2001447e7dcd4d3b 
01-10 11:35:23.320: D/FlurryAgent(3915): Loading session reports 
01-10 11:35:23.320: D/FlurryAgent(3915): Session report added: 1 
01-10 11:35:23.320: D/FlurryAgent(3915): Session report added: 2 
01-10 11:35:23.320: D/FlurryAgent(3915): Persistent file loaded 
01-10 11:35:23.560: D/FlurryAgent(3915): generating report 
01-10 11:35:23.570: D/FlurryAgent(3915): Sending report to: http://data.flurry.com/aap.do 
01-10 11:35:29.610: D/FlurryAgent(3915): Report successful 
01-10 11:35:29.610: D/FlurryAgent(3915): Done sending initial agent report 

मुझे लगता है कि चाल निम्नलिखित फोन तुम नहीं है:

यहाँ प्रासंगिक कोड है जो Android लॉग को संदेश लिखने के लिए घबराहट कॉन्फ़िगर किया गया है है:

FlurryAgent.setLogLevel(Log.VERBOSE); 
+0

आपके उत्तर के लिए धन्यवाद .. मुझे अगले दिन फ्लोर में लॉग इन किया गया है और फिर भी यह लॉगकैट में लॉग इन नहीं करता है .. –

+0

क्या आपने setLogLevel (Log.VERBOSE) को कॉल जोड़ा है? साथ ही, यह देखने के लिए कि कोई भी gremlins बिल्ड और तैनाती प्रक्रिया में छिपा रहे हैं, इसे पुनर्स्थापित करने से पहले एक साफ निर्माण करने और अपने ऐप को अनइंस्टॉल करने का प्रयास करें। – JulianHarty

+0

कृपया जब आप जिस ऐप में समस्याएं चलाते हैं, तो आप जेनरेट किए गए लॉग को भी पोस्ट कर सकते हैं। इसमें कम से कम शामिल होना चाहिए: "startng flurry session ..." तो हम जानते हैं कि ऑनस्टार्ट सत्र() पर कॉल होता है। और क्या आप पुष्टि कर सकते हैं कि फ्लोरी के किस संस्करण में आपको समस्याएं आ रही हैं? – JulianHarty

0

यह मेरे लिए काम करता है:

@Override 
protected void onStart() { 
    super.onStart(); 
    FlurryAgent.setLogEnabled(true); 
    FlurryAgent.setLogLevel(Log.VERBOSE); 
    FlurryAgent.onStartSession(this, "XXXXXXXXXXXXXXX"); 
    //System.out.println("Started Flurry"); 
} 

@Override 
protected void onStop() { 
    super.onStop();  
    FlurryAgent.onEndSession(this); 
    //System.out.println("Stopped Flurry"); 
} 
+1

मुझे पता है कि यह काम कर रहा है लेकिन जब आप सीधे गतिविधि में 'FlurryAgent' का उपयोग करते हैं। मैंने एक और फ्लोरी यूज क्लास बनाया था जो काम नहीं कर रहा था। क्योंकि मुझे लगता है कि मैं 'init' विधि के माध्यम से संदर्भ दे रहा था और मुझे नहीं पता कि Flurry को 'संदर्भ' में समस्या क्यों है। प्रत्येक डेवलपर को 'संदर्भ' की शिकायत होती है। –

0

उन लोगों के लिए जो हाल ही में मेरे जैसी ही समस्याएं हैं।

FlurryAgent.setLogEnabled(true); 
FlurryAgent.setLogEvents(true); 
FlurryAgent.setLogLevel(Log.VERBOSE); 
// must be last one 
FlurryAgent.init(context, "some key"); 

मैं कक्षा में फ्लोरी शुरू कर रहा था जो आवेदन को बढ़ाता है। इनिट कॉल आखिरी है यह महत्वपूर्ण था।

यह 3 तरीकों के लिए here उल्लेख किया है, पृष्ठ के तल पर देखते हैं:

... इस init से पहले बुलाया जाना चाहिए।