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


Java Tracker.setScreenName方法代码示例

本文整理汇总了Java中com.google.android.gms.analytics.Tracker.setScreenName方法的典型用法代码示例。如果您正苦于以下问题:Java Tracker.setScreenName方法的具体用法?Java Tracker.setScreenName怎么用?Java Tracker.setScreenName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.android.gms.analytics.Tracker的用法示例。


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

示例1: onViewCreated

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    listView = (RecyclerView)view.findViewById(android.R.id.list);
    listView.setLayoutManager(new LinearLayoutManager(getActivity()));
    listView.setItemAnimator(new DefaultItemAnimator());
    listView.setAdapter(adapter);

    view.findViewById(R.id.fabNewPlaylist).setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            newPlaylist();
        }
    });

    Tracker t = ((NavigationActivity)getActivity()).getTracker(NavigationActivity.TrackerName.APP_TRACKER);
    t.setScreenName("List of playlists");
    t.send(new HitBuilders.AppViewBuilder().build());
}
 
开发者ID:dmllr,项目名称:IdealMedia,代码行数:21,代码来源:PlaylistsFragment.java

示例2: init

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
public void init(BaseActivity activity){
    baseActivity = activity;
    activityStack.push(activity);
    sh = new SharedHelper(activity.getApplicationContext());
    loadingDialog = new LoadingDialog(activity);
    loadingDialog.setOnCancelListener((dialogInterface -> canceled = true));
    String screenName = activity.getClass().getSimpleName();
    activityMap.put(screenName  + System.currentTimeMillis(), activity);
    if (SStaticR.ANALYTICS_ON){
        // Obtain the shared Tracker instance.
        LIVE application = (LIVE)baseActivity.getApplication();
        Tracker mTracker = application.getDefaultTracker();
        mTracker.setScreenName(screenName);
        mTracker.send(new HitBuilders.ScreenViewBuilder().build());
    }
}
 
开发者ID:Lazyeraser,项目名称:DereHelper,代码行数:17,代码来源:Base.java

示例3: onCreate

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {

    getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash);

    mContext = this;
    mActivity = this;

    avi = (AVLoadingIndicatorView) findViewById(R.id.avi);
    avi.show();

    snackView = (View) findViewById(R.id.snackView);

    launchGetStations(mContext, mActivity);

    App application = (App) getApplication();
    Tracker mTracker = application.getDefaultTracker();
    mTracker.setScreenName(getString(R.string.splash_activity));
    mTracker.send(new HitBuilders.ScreenViewBuilder().build());

}
 
开发者ID:ficiverson,项目名称:radiocom-android,代码行数:25,代码来源:Splash.java

示例4: onViewCreated

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    listView = (RecyclerView) view.findViewById(android.R.id.list);
    listView.setLayoutManager(new LinearLayoutManager(getActivity()));
    listView.setItemAnimator(new DefaultItemAnimator());

    Tracker t = ((NavigationActivity)getActivity()).getTracker(NavigationActivity.TrackerName.APP_TRACKER);
    t.setScreenName("Folders and files");
    t.send(new HitBuilders.AppViewBuilder().build());
}
 
开发者ID:dmllr,项目名称:IdealMedia,代码行数:13,代码来源:FoldersFragment.java

示例5: onViewCreated

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view,savedInstanceState);

    list = (RecyclerView)view.findViewById(android.R.id.list);
    list.setItemAnimator(new DefaultItemAnimator());
    setLayoutManager();

    progress = (CircularProgressButton)view.findViewById(android.R.id.progress);
    empty = view.findViewById(android.R.id.empty);

    new AsyncTask<Void, Void, ArrayList<Track>>() {
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            activity.setRefreshing(true);
        }

        @Override
        protected ArrayList<Track> doInBackground(Void... voids) {
            return (ArrayList<Track>) FileUtils.read("albumsTracks", activity);
        }

        @Override
        protected void onPostExecute(ArrayList<Track> tracks) {
            super.onPostExecute(tracks);
            activity.setRefreshing(false);
            OnTaskResult(tracks);
        }
    }.execute();

    Tracker t = ((NavigationActivity)getActivity()).getTracker(NavigationActivity.TrackerName.APP_TRACKER);
    t.setScreenName("Albums");
    t.send(new HitBuilders.AppViewBuilder().build());
}
 
开发者ID:dmllr,项目名称:IdealMedia,代码行数:36,代码来源:AlbumsFragment.java

示例6: onViewCreated

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    adapter = new PlayerAdapter(activity, this, playlistResultsLocal, playlistResultsVK);

    listView = (RecyclerView) view.findViewById(android.R.id.list);
    listView.setLayoutManager(new LinearLayoutManager(getActivity()));
    listView.setItemAnimator(new DefaultItemAnimator());
    listView.setAdapter(adapter);

    Tracker t = ((NavigationActivity)getActivity()).getTracker(NavigationActivity.TrackerName.APP_TRACKER);
    t.setScreenName("Playlist");
    t.send(new HitBuilders.AppViewBuilder().build());
}
 
开发者ID:dmllr,项目名称:IdealMedia,代码行数:16,代码来源:SearchResultsFragment.java

示例7: onViewCreated

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    adapter = new PlayerAdapter(activity, this, items);
    listView = (RecyclerView) view.findViewById(android.R.id.list);
    listView.setLayoutManager(new LinearLayoutManager(getActivity()));
    listView.setItemAnimator(new DefaultItemAnimator());
    listView.setAdapter(adapter);

    Tracker t = ((NavigationActivity)getActivity()).getTracker(NavigationActivity.TrackerName.APP_TRACKER);
    t.setScreenName("Playlist");
    t.send(new HitBuilders.AppViewBuilder().build());
}
 
开发者ID:dmllr,项目名称:IdealMedia,代码行数:15,代码来源:PlaylistFragment.java

示例8: onViewCreated

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    adapter = new PlayerAdapter(activity, this, items);
    listView = (RecyclerView) view.findViewById(android.R.id.list);
    listView.setLayoutManager(new LinearLayoutManager(getActivity()));
    listView.setItemAnimator(new DefaultItemAnimator());

    listView.setAdapter(adapter);

    Tracker t = ((NavigationActivity)getActivity()).getTracker(NavigationActivity.TrackerName.APP_TRACKER);
    t.setScreenName("Now playing");
    t.send(new HitBuilders.AppViewBuilder().build());
}
 
开发者ID:dmllr,项目名称:IdealMedia,代码行数:16,代码来源:PlayerFragment.java

示例9: onViewCreated

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view,savedInstanceState);

    list = (RecyclerView)view.findViewById(android.R.id.list);
    list.setItemAnimator(new DefaultItemAnimator());
    setLayoutManager();

    progress = (CircularProgressButton)view.findViewById(android.R.id.progress);
    empty = view.findViewById(android.R.id.empty);

    new AsyncTask<Void, Void, ArrayList<Track>>() {
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            activity.setRefreshing(true);
        }

        @Override
        protected ArrayList<Track> doInBackground(Void... voids) {
            return (ArrayList<Track>) FileUtils.read("artistsTracks", activity);
        }

        @Override
        protected void onPostExecute(ArrayList<Track> tracks) {
            super.onPostExecute(tracks);
            activity.setRefreshing(false);
            OnTaskResult(tracks);
        }
    }.execute();

    Tracker t = ((NavigationActivity)getActivity()).getTracker(NavigationActivity.TrackerName.APP_TRACKER);
    t.setScreenName("Artists");
    t.send(new HitBuilders.AppViewBuilder().build());
}
 
开发者ID:dmllr,项目名称:IdealMedia,代码行数:36,代码来源:ArtistsFragment.java

示例10: onViewCreated

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    adapter = new PlayerAdapter(activity, this, items);
    listView = (RecyclerView) view.findViewById(android.R.id.list);
    listView.setLayoutManager(new LinearLayoutManager(getActivity()));
    listView.setItemAnimator(new DefaultItemAnimator());
    listView.setAdapter(adapter);

    Tracker t = ((NavigationActivity)getActivity()).getTracker(NavigationActivity.TrackerName.APP_TRACKER);
    t.setScreenName("VK audio");
    t.send(new HitBuilders.AppViewBuilder().build());
}
 
开发者ID:dmllr,项目名称:IdealMedia,代码行数:15,代码来源:VKAudioFragment.java

示例11: trackScreenView

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
public void trackScreenView(String screenName) {
    Tracker t = getGoogleAnalyticsTracker();
    // Set screen name.
    t.setScreenName(screenName);
    // Send a screen view.
    t.send(new HitBuilders.ScreenViewBuilder().build());
    GoogleAnalytics.getInstance(this).dispatchLocalHits();
}
 
开发者ID:reyanshmishra,项目名称:Rey-MusicPlayer,代码行数:9,代码来源:Common.java

示例12: onResume

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
protected void onResume() {
    super.onResume();
    Tracker defaultTracker = ((MovieCheckApplication) getApplication()).getDefaultTracker();
    defaultTracker.setScreenName("List Of Now Playing Movies Screen");
    defaultTracker.send(new HitBuilders.ScreenViewBuilder().build());
}
 
开发者ID:tassioauad,项目名称:Movie-Check,代码行数:8,代码来源:ListNowPlayingMoviesActivity.java

示例13: onResume

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
protected void onResume() {
    super.onResume();
    Tracker defaultTracker = ((MovieCheckApplication) getApplication()).getDefaultTracker();
    defaultTracker.setScreenName("List Movies By Genre Screen");
    defaultTracker.send(new HitBuilders.ScreenViewBuilder().build());
}
 
开发者ID:tassioauad,项目名称:Movie-Check,代码行数:8,代码来源:ListMoviesByGenreActivity.java

示例14: onCreateView

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    View v = inflater.inflate(R.layout.fragment_news, container, false);

    mActivity = (Home) getActivity();
    mContext = getContext();

    newsList = (ListView) v.findViewById(R.id.newslist);
    noElements = (TextView) v.findViewById(R.id.no_elements);

    avi = (AVLoadingIndicatorView) v.findViewById(R.id.avi);
    avi.show();

    if (!station.getNews_rss().isEmpty()) {
        new GetNews(mActivity.getBaseContext(), this, station.getNews_rss()).execute();
    } else {
        listChannels(null);
    }

    App application = (App) getActivity().getApplication();
    Tracker mTracker = application.getDefaultTracker();
    mTracker.setScreenName(getString(R.string.news_view));
    mTracker.send(new HitBuilders.ScreenViewBuilder().build());

    return v;
}
 
开发者ID:ficiverson,项目名称:radiocom-android,代码行数:28,代码来源:NewsPageFragment.java

示例15: onCreate

import com.google.android.gms.analytics.Tracker; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {

    getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_tutorial);
    mContext = this;
    jsonStation = getIntent().getStringExtra(GlobalValues.EXTRA_MESSAGE);

    DiscrollvableLastLayout continuetutorial = (DiscrollvableLastLayout) findViewById(R.id.continuetutorial);
    continuetutorial.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            //do not show again
            SharedPreferences prefs = mContext.getSharedPreferences(GlobalValues.prefName, Context.MODE_PRIVATE);
            SharedPreferences.Editor edit = prefs.edit();
            edit.putBoolean("showTutorial", false);
            edit.commit();

            //launch next activity
            Intent intent = new Intent(mContext, Home.class);
            intent.putExtra(GlobalValues.EXTRA_MESSAGE, jsonStation);
            startActivity(intent);
        }
    });

    App appliaction = (App) getApplication();
    Tracker mTracker = appliaction.getDefaultTracker();
    mTracker.setScreenName(getString(R.string.tutorial_activity));
    mTracker.send(new HitBuilders.ScreenViewBuilder().build());

}
 
开发者ID:ficiverson,项目名称:radiocom-android,代码行数:36,代码来源:Tutorial.java


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