本文整理汇总了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());
}
示例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());
}
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}
示例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();
}
示例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());
}
示例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());
}
示例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;
}
示例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());
}