当前位置: 首页>>代码示例>>Java>>正文


Java ContentViewEvent类代码示例

本文整理汇总了Java中com.crashlytics.android.answers.ContentViewEvent的典型用法代码示例。如果您正苦于以下问题:Java ContentViewEvent类的具体用法?Java ContentViewEvent怎么用?Java ContentViewEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ContentViewEvent类属于com.crashlytics.android.answers包,在下文中一共展示了ContentViewEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "onCreate");
    super.onCreate(savedInstanceState);

    Intent intent = getActivity().getIntent();

    mPlaylistId = intent.getStringExtra(PlaylistActivity.ARG_PLAYLIST_ID);
    mUserId = intent.getStringExtra(PlaylistActivity.ARG_USER_ID);

    loadPlaylist();

    Answers.getInstance().logContentView(new ContentViewEvent()
            .putContentName(Constants.ANSWERS_CONTENT_NAME)
            .putContentType(Constants.ANSWERS_CONTENT_TYPE)
            .putContentId(mPlaylistId));
}
 
开发者ID:sregg,项目名称:spotify-tv,代码行数:18,代码来源:PlaylistDetailsFragment.java

示例2: onCreate

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "onCreate");
    super.onCreate(savedInstanceState);

    Intent intent = getActivity().getIntent();

    mAlbumId = intent.getStringExtra(AlbumActivity.ARG_ALBUM_ID);

    loadAlbum();

    Answers.getInstance().logContentView(new ContentViewEvent()
            .putContentName(Constants.ANSWERS_CONTENT_ALBUM)
            .putContentType(Constants.ANSWERS_CONTENT_TYPE)
            .putContentId(mAlbumId));
}
 
开发者ID:sregg,项目名称:spotify-tv,代码行数:17,代码来源:AlbumDetailsFragment.java

示例3: onCreateView

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_recent, container, false);

    ButterKnife.bind(this, view);

    mRecyclerView.setLayoutManager(new AnimatedLayoutManager(this.getActivity(), 1));

    adapter = new WorkoutListViewAdapter(this.getActivity(), cacheReceiver.getCursor());
    adapter.setHasStableIds(true);
    adapter.setOnItemClickListener(this);

    mRecyclerView.setItemAnimator(new ItemAnimator());
    mRecyclerView.setAdapter(adapter);
    if(Answers.getInstance() != null) {
        Answers.getInstance().logContentView(new ContentViewEvent()
                .putContentName("Historical activity data")
                .putContentType("View")
                .putContentId("RecentFragment"));
    }

    return view;
}
 
开发者ID:blackcj,项目名称:GoogleFitExample,代码行数:25,代码来源:RecentFragment.java

示例4: logGuide

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
public static void logGuide(String type, String installer) {
    try {
        Answers.getInstance().logContentView(new ContentViewEvent()
                .putContentName("Guide")
                .putContentType(type)
                .putContentId("guide-" + type)
                .putCustomAttribute("installer", installer));
    } catch (IllegalStateException e) { // NOSONAR
        // do nothing
    }
}
 
开发者ID:brevent,项目名称:Brevent,代码行数:12,代码来源:StatsUtils.java

示例5: sendScreenView

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
@Override
public void sendScreenView(String screenName) {
    tracker.setScreenName(screenName);
    tracker.send(new HitBuilders.ScreenViewBuilder().build());

    answers.logContentView(new ContentViewEvent().putContentName(screenName));
}
 
开发者ID:tasomaniac,项目名称:MuzeiHistory,代码行数:8,代码来源:Analytics.java

示例6: sendView

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
@Override
public void sendView(String name, String type) {
    ContentViewEvent contentViewEvent = new ContentViewEvent();

    contentViewEvent.putContentName(name);
    contentViewEvent.putContentType(type);

    Answers.getInstance().logContentView(contentViewEvent);
}
 
开发者ID:HugoGresse,项目名称:Anecdote,代码行数:10,代码来源:EventSender.java

示例7: onCreate

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    drawer = (DrawerLayout) findViewById(R.id.drawer_layout);

    if (mShouldShowLeftMenu) {
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        if (toolbar != null) {
            setSupportActionBar(toolbar);

            if (drawer != null) {
                ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
                        this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
                drawer.setDrawerListener(toggle);
                toggle.syncState();

                NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
                if (navigationView != null)
                    navigationView.setVisibility(View.VISIBLE);
            }
        }
    }


    // Create a record that user has visited the current activity
    Answers.getInstance().logContentView(new ContentViewEvent()
            .putContentId(getClass().getName()));
}
 
开发者ID:Hitchwiki,项目名称:MyHitchhikingSpots-for-Android,代码行数:30,代码来源:BaseActivity.java

示例8: logSpecificEvent

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
@Override
public void logSpecificEvent(@NonNull AnalyticsEvent event)
{
	ContentViewEvent contentViewEvent = buildAnswersContentViewEvent(event);

	answers.logContentView(contentViewEvent);
}
 
开发者ID:busybusy,项目名称:AnalyticsKit-Android,代码行数:8,代码来源:ContentViewLogger.java

示例9: test_buildAnswersContentViewEvent

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
@Test
public void test_buildAnswersContentViewEvent()
{
	ContentViewEvent result = logger.buildAnswersContentViewEvent(contentViewEvent);

	Map<String, Object> predefinedAttributes = PackageScopeWrappedCalls.getPredefinedAttributes(result);
	assertThat(predefinedAttributes.size()).isEqualTo(3);
	assertThat(predefinedAttributes).containsKey(Attributes.ContentView.CONTENT_NAME);
	assertThat(predefinedAttributes).containsKey(Attributes.ContentView.CONTENT_TYPE);
	assertThat(predefinedAttributes).containsKey(Attributes.ContentView.CONTENT_ID);

	Map<String, Object> customAttributes = PackageScopeWrappedCalls.getCustomAttributes(result);
	assertThat(customAttributes.size()).isEqualTo(1);
	assertThat(customAttributes).containsKey(CUSTOM_KEY);
}
 
开发者ID:busybusy,项目名称:AnalyticsKit-Android,代码行数:16,代码来源:ContentViewLoggerTest.java

示例10: onCreate

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_about);

    mToolbar.setTitle(R.string.about);

    setHomeButtonEnabled(true);

    CryptogramApp.getInstance().getFirebaseAnalytics().setCurrentScreen(this, CryptogramApp.CONTENT_ABOUT, null);
    Answers.getInstance().logContentView(new ContentViewEvent().putContentName(CryptogramApp.CONTENT_ABOUT));
}
 
开发者ID:pflammertsma,项目名称:cryptogram,代码行数:13,代码来源:AboutActivity.java

示例11: onCreate

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_how_to_play);

    mToolbar.setTitle(R.string.how_to_play);

    setHomeButtonEnabled(true);

    CryptogramApp.getInstance().getFirebaseAnalytics().setCurrentScreen(this, CryptogramApp.CONTENT_HOW_TO_PLAY, null);
    Answers.getInstance().logContentView(new ContentViewEvent().putContentName(CryptogramApp.CONTENT_HOW_TO_PLAY));
}
 
开发者ID:pflammertsma,项目名称:cryptogram,代码行数:13,代码来源:HowToPlayActivity.java

示例12: onCreate

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_settings);

    mToolbar.setTitle(R.string.settings);

    setHomeButtonEnabled(true);

    CryptogramApp.getInstance().getFirebaseAnalytics().setCurrentScreen(this, CryptogramApp.CONTENT_SETTINGS, null);
    Answers.getInstance().logContentView(new ContentViewEvent().putContentName(CryptogramApp.CONTENT_SETTINGS));
}
 
开发者ID:pflammertsma,项目名称:cryptogram,代码行数:13,代码来源:SettingsActivity.java

示例13: onBookEvent

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
public void onBookEvent(String bookTitle, String bookId) {
    onBookEvent = new ContentViewEvent()
            .putContentId(bookId)
            .putContentType("Book")
            .putContentName(bookTitle);
    Answers.getInstance().logContentView(onBookEvent);
}
 
开发者ID:hypeapps,项目名称:wykopolka-android,代码行数:8,代码来源:AnalyticsPlugin.java

示例14: sendContentView

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
public void sendContentView(final JSONArray data, final CallbackContext context) {
    final JSONObject obj = data.optJSONObject(0);

    this.cordova.getActivity().runOnUiThread(new Runnable() {
        @Override
        public void run() {
            ContentViewEvent evt = new ContentViewEvent();

            evt.putContentName(obj.optString("name"));
            evt.putContentType(obj.optString("type"));
            evt.putContentId(obj.optString("id"));

            if( obj.has("attributes") ) {
                JSONObject json = obj.optJSONObject("attributes");

                Iterator<String> keys = json.keys();
                while(keys.hasNext()){
                    String key = keys.next();

                    try {
                        evt.putCustomAttribute(key, json.getString(key));
                    } catch(Exception e) {}
                }
            }

            Answers.getInstance().logContentView(evt);
        }
    });
}
 
开发者ID:napolitano,项目名称:cordova-plugin-answers,代码行数:30,代码来源:AnswersPlugin.java

示例15: appIndexStart

import com.crashlytics.android.answers.ContentViewEvent; //导入依赖的package包/类
private void appIndexStart(@NonNull String routeNo) {
    if (TextUtils.isEmpty(routeNo)) return;
    FirebaseUserActions.getInstance().start(getIndexApiAction(routeNo))
            .addOnCompleteListener(this, task -> {
                if (task.isSuccessful()) {
                    Timber.d("App Indexing: Recorded start successfully");
                } else {
                    Timber.d("App Indexing: fail");
                }
            });
    Answers.getInstance().logContentView(new ContentViewEvent()
            .putContentName("search")
            .putContentType("route")
            .putCustomAttribute("route Nno", routeNo));
}
 
开发者ID:alvinhkh,项目名称:buseta,代码行数:16,代码来源:SearchActivity.java


注:本文中的com.crashlytics.android.answers.ContentViewEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。