當前位置: 首頁>>代碼示例>>Java>>正文


Java FlurryAgent類代碼示例

本文整理匯總了Java中com.flurry.android.FlurryAgent的典型用法代碼示例。如果您正苦於以下問題:Java FlurryAgent類的具體用法?Java FlurryAgent怎麽用?Java FlurryAgent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


FlurryAgent類屬於com.flurry.android包,在下文中一共展示了FlurryAgent類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onStart

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
protected void onStart() {
    if (mHomeKeyEventReceiver != null && mHomeKeyEventReceiver.isHomeClicked()) {
        BaseApplication.setAppStartTime(System.currentTimeMillis());
    }
    super.onStart();
    if (hasApplyPermissions()) {
        LeMessageManager.getInstance().dispatchMessage(new LeMessage(LeMessageIds.MSG_FLOAT_BALL_REQUEST_DATA));
        FlurryAgent.onStartSession(this, LetvConfig.getFlurryKey());
        if (mHomeKeyEventReceiver != null && mHomeKeyEventReceiver.isHomeClicked()) {
            StatisticsUtils.sHasStatisticsLaunch = false;
            isLoginStatatistics = false;
            statisticsLaunch(0, true);
            LogInfo.LogStatistics("app start from home");
        }
    }
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:17,代碼來源:LetvBaseActivity.java

示例2: onRequestSuccess

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
@Override
public void onRequestSuccess(List<Object> result, Class<?> clazz) {
    if (isResumed()) {
        if (clazz == Event.class) {
            FlurryAgent.logEvent("Refresh events");
            List<Event> events = new ArrayList<Event>();
            for (Object aResult : result) {
                final Event event = (Event) aResult;
                events.add(event);
            }
            if (mIsDataObsolete) {
                mIsDataObsolete = false;
            }
            dismissDialog();
            setAdapterData(events);
            //mAdapter.setEventList(events);
        }
        completeListRefresh();
    }
}
 
開發者ID:CactusSoft,項目名稱:zabbkit-android,代碼行數:21,代碼來源:EventFragment.java

示例3: onOptionsItemSelected

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    int i = item.getItemId();
    if (i == android.R.id.home) {
        getActivity().onBackPressed();
        return true;
    } else if (i == R.id.menu_share) {
        FlurryAgent.logEvent("App_View_Clicked_On_Share_Button");

        Intent sharingIntent = new Intent(Intent.ACTION_SEND);
        sharingIntent.setType("text/plain");
        sharingIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.install) + " \"" + appName + "\"");
        sharingIntent.putExtra(Intent.EXTRA_TEXT, wUrl);

        if (wUrl != null) {
            startActivity(Intent.createChooser(sharingIntent, getString(R.string.share)));
        }
    } else if (i == R.id.menu_schedule) {
        new AptoideDatabase(Aptoide.getDb()).scheduledDownloadIfMd5(packageName, md5sum, versionName, storeName, appName, iconUrl);
    }

    return super.onOptionsItemSelected(item);
}
 
開發者ID:Aptoide,項目名稱:aptoide-client,代碼行數:24,代碼來源:AppViewActivity.java

示例4: setShareTimeLineButton

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
private void setShareTimeLineButton() {
    final CheckBox btinstallshare = (CheckBox) getView().findViewById(R.id.btinstallshare);
    if (Preferences.getBoolean(Preferences.TIMELINE_ACEPTED_BOOL, false)) {
        btinstallshare.setVisibility(View.VISIBLE);
        btinstallshare.setChecked(Preferences.getBoolean(Preferences.SHARE_TIMELINE_DOWNLOAD_BOOL, true));
        btinstallshare.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                final Map<String, String> shareTimelineParams = new HashMap<String, String>();
                shareTimelineParams.put("Share_Timeline", String.valueOf(isChecked));
                FlurryAgent.logEvent("App_View_Clicked_On_Share_Timeline_Checkbox", shareTimelineParams);
                Preferences.putBooleanAndCommit(Preferences.SHARE_TIMELINE_DOWNLOAD_BOOL, isChecked);
            }
        });
    } else {
        btinstallshare.setVisibility(View.INVISIBLE);
    }
}
 
開發者ID:Aptoide,項目名稱:aptoide-client,代碼行數:19,代碼來源:AppViewActivity.java

示例5: request

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
@Override
protected void request(Context context, Map<String, String> networkData) {

    if (context == null || networkData == null) {
        invokeLoadFail(PNException.ADAPTER_ILLEGAL_ARGUMENTS);
    } else {
        String adSpaceName = networkData.get(Flurry.KEY_AD_SPACE_NAME);
        String apiKey = networkData.get(Flurry.KEY_FLURRY_API_KEY);
        if (TextUtils.isEmpty(adSpaceName) || TextUtils.isEmpty(apiKey)) {
            invokeLoadFail(PNException.ADAPTER_MISSING_DATA);
        } else {

            new FlurryAgent.Builder().withLogEnabled(true).build(context, apiKey);
            // execute/resume session
            if (!FlurryAgent.isSessionActive()) {
                FlurryAgent.onStartSession(context);
            }

            mInterstitialAd = new FlurryAdInterstitial(context, adSpaceName);
            mInterstitialAd.setTargeting(Flurry.getTargeting());
            mInterstitialAd.setListener(this);
            mInterstitialAd.fetchAd();
        }
    }
}
 
開發者ID:pubnative,項目名稱:pubnative-android-sdk,代碼行數:26,代碼來源:YahooNetworkInterstitialAdapter.java

示例6: init

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
public static void init(Context context) {
    storage = new SQLiteStaticsStorage(context);
    new FlurryAgent.Builder()
            .withLogEnabled(BuildConfig.DEBUG)
            .build(context, "D42MH48ZN4PJC5TKNYZD");
    preferences = PreferenceManager.getDefaultSharedPreferences(context);
}
 
開發者ID:feifadaima,項目名稱:https-github.com-hyb1996-NoRootScriptDroid,代碼行數:8,代碼來源:ScriptStatics.java

示例7: sendStaticsIfNeeded

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
private static void sendStaticsIfNeeded() {
    long millis = preferences.getLong(KEY_MILLIS, 0);
    if (!DateUtils.isToday(millis)) {
        preferences.edit().putLong(KEY_MILLIS, System.currentTimeMillis()).apply();
        FlurryAgent.logEvent("ScriptStatics", storage.getMax(10));
    }
}
 
開發者ID:feifadaima,項目名稱:https-github.com-hyb1996-NoRootScriptDroid,代碼行數:8,代碼來源:ScriptStatics.java

示例8: setUpStaticsTool

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
private void setUpStaticsTool() {
    if (BuildConfig.DEBUG)
        return;
    new FlurryAgent.Builder()
            .withLogEnabled(BuildConfig.DEBUG)
            .build(this, "D42MH48ZN4PJC5TKNYZD");
}
 
開發者ID:hyb1996,項目名稱:Auto.js,代碼行數:8,代碼來源:App.java

示例9: onStop

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
protected void onStop() {
    super.onStop();
    if (hasApplyPermissions()) {
        if (this.mRedPacketEntry != null) {
            this.mRedPacketEntry.stop();
        }
        FlurryAgent.onEndSession(this);
    }
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:10,代碼來源:LetvBaseActivity.java

示例10: reportCameraNativeSetup

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
private static void reportCameraNativeSetup() {
    for (Method method : Camera.class.getDeclaredMethods()) {
        if ("native_setup".equals(method.getName())) {
            FlurryEventRecordStatus status =
                    FlurryAgent.logEvent("camera::native_setup", createLogContent("method_details", Reflect.getMethodDetails(method)));
            Log.d(TAG, "report CNS: " + status);
            break;
        }
    }
}
 
開發者ID:7763sea,項目名稱:VirtualHook,代碼行數:11,代碼來源:FlurryROMCollector.java

示例11: onCreateView

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    view = inflater.inflate(R.layout.fr_about, container,
            false);

    if (savedInstanceState != null) {
        mSelectedTab = savedInstanceState.getInt(SELECTED_TAB_NUM_KEY, 0);
    }
    initView();
    FlurryAgent.logEvent("About page");

    return view;
}
 
開發者ID:CactusSoft,項目名稱:zabbkit-android,代碼行數:15,代碼來源:AboutFragment.java

示例12: onCreateView

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    rootView = inflater.inflate(R.layout.fr_overview, container,
            false);
    setHasOptionsMenu(true);

    initView(savedInstanceState);
    checkGooglePlayServices();
    FlurryAgent.logEvent("Show OverView");

    return rootView;
}
 
開發者ID:CactusSoft,項目名稱:zabbkit-android,代碼行數:14,代碼來源:OverviewFragment.java

示例13: onCreate

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.ac_trigger_history);

    FlurryAgent.logEvent("Show Trigger Events");

    final ActionBar actionBar = getSupportActionBar();
    actionBar.setTitle(R.string.trigger_history);
    actionBar.setDisplayHomeAsUpEnabled(true);
    actionBar.setHomeButtonEnabled(true);

    requestTriggerHistory();
    showDialog();

    mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_layout);
    mSwipeRefreshLayout.setColorSchemeResources(R.color.grey);
    mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
        @Override
        public void onRefresh() {
            requestTriggerHistory();
            mIsOnRefresh = true;
        }
    });

    listView = (ListView) findViewById(R.id.pull_refresh_list);
}
 
開發者ID:CactusSoft,項目名稱:zabbkit-android,代碼行數:30,代碼來源:TriggerHistoryActivity.java

示例14: onRequestSuccess

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
@Override
public void onRequestSuccess(List<Object> result,
                             Class<?> clazz) {
    FlurryAgent.logEvent("Refresh Trigger Events");

    int threatDegree = 0;
    final List<Event> events = new ArrayList<Event>();
    for (Object aResult : result) {
        final Event event = (Event) aResult;
        events.add(event);
        final int eventPriority = Integer
                .valueOf((event.triggers != null && !event.triggers.isEmpty()) ? event.triggers.get(0).priority : "0");
        if (eventPriority > threatDegree) {
            threatDegree = eventPriority;
        }
    }

    final TextView threatView = (TextView) findViewById(R.id.threat_view);
    final TextView titleView = (TextView) findViewById(R.id.title_view);
    final TextView urlView = (TextView) findViewById(R.id.link_addr);
    final TextView commentView = (TextView) findViewById(R.id.comment);

    threatView.setText(getString(GeneralAbility.getState(threatDegree)));
    titleView.setText(mTriggerName);
    urlView.setText(mTriggerUrl);
    commentView.setText(mTriggerComments);

    listView.setAdapter(new TriggerHistoryAdapter(events));
    dismissDialog();
    mDateTimeUpdate = DateFormat.getDateTimeInstance().format(new Date());
    SharedPreferencesEditor.getInstance().putString(
            Constants.PREFS_UPDATE_DATE_TRIGGERS, mDateTimeUpdate);

    if (mIsOnRefresh) {
        mSwipeRefreshLayout.setRefreshing(false);
        mIsOnRefresh = false;
    }
}
 
開發者ID:CactusSoft,項目名稱:zabbkit-android,代碼行數:39,代碼來源:TriggerHistoryActivity.java

示例15: onRequestSuccess

import com.flurry.android.FlurryAgent; //導入依賴的package包/類
@Override
public void onRequestSuccess(String redirectedUrl, List<Object> result, Class<?> clazz) {
    if (dismissDialog()) {
        String url = null;
        if (redirectedUrl == null) {
            url = mUrlView.getText().toString();
        } else {
            url = redirectedUrl;
        }
        url = url.trim();
        SharedPreferencesEditor.getInstance().putString(
                Constants.PREFS_URL_SHORTCUT, url);
        SharedPreferencesEditor.getInstance().putString(
                Constants.PREFS_URL_FULL, collectUrl(url));
        SharedPreferencesEditor.getInstance().putString(Constants.PREFS_AUTH,
                (String) result.get(0));
        SharedPreferencesEditor.getInstance().putString(Constants.PREFS_USER,
                mNameView.getText().toString().trim());
        SharedPreferencesEditor.getInstance().putBoolean(
                Constants.PREFS_IS_AUTHORIZED, true);
        SharedPreferencesEditor.getInstance().putString(
                Constants.PREFS_PASSWORD, mPasswordView.getText().toString());
        FlurryAgent.logEvent("User was sign in successfully");
        final Intent intent = new Intent(getApplicationContext(),
                SlideMenuActivity.class);
        startActivity(intent);
        finish();
    }
}
 
開發者ID:CactusSoft,項目名稱:zabbkit-android,代碼行數:30,代碼來源:LoginActivity.java


注:本文中的com.flurry.android.FlurryAgent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。