• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java StatService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: onCreateView

import com.baidu.mobstat.StatService; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.common_recycler_status, container, false);
    ButterKnife.bind(this, rootView);

    StatService.onEvent(getContext(), "tv_query_1", "pass", 1);
    status.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            presenter.query();
        }
    });

    presenter = new TvPresenter(this);
    presenter.query();

    return rootView;
}
 
开发者ID:Lee-swifter,项目名称:UToolBox,代码行数:20,代码来源:TvTableFragment.java


示例2: onListItemClick

import com.baidu.mobstat.StatService; //导入依赖的package包/类
public void onListItemClick(ListView l, View v, int position, long id){
	
	RebateItem item = this.adapter.getItem(position);
	String shortKey = item.shortKey;
	String numIid = item.numIId + "";
	
	Log.d("emop", "onItemClick, id:" + id + ", short key:" + shortKey);
	if(shortKey != null && shortKey.length() > 0){
		StatService.onEvent(getActivity(), "go_rebate", numIid + "_" + shortKey + "_" + client.userId, 1);
    	String url = "http://c.emop.cn/c/" + shortKey + "?from=app&auto_mobile=n";
    	Intent intent = new Intent().setClass(getActivity(), WebViewActivity.class);
    	intent.putExtra("http_url", url);
    	intent.putExtra("taoke_num_iid", numIid);
    	startActivity(intent);
	}
}
 
开发者ID:emop,项目名称:EmopAndroid,代码行数:17,代码来源:RebateListFragment.java


示例3: goBuy

import com.baidu.mobstat.StatService; //导入依赖的package包/类
public void goBuy(){
	if(shortKey != null && shortKey.length() > 0){
 	String url = "http://c.emop.cn/c/" + shortKey + "?from=app";
 	if(fromMobile){
 		url += "&auto_mobile=n";
 	}else {
 		url += "&auto_mobile=y";    		
 	}
 	StatService.onEvent(getActivity(), "go_shop", shopId + "_" + shortKey, 1);
 	Intent intent = new Intent().setClass(getActivity(), WebViewActivity.class);
 	intent.putExtra("http_url", url);
 	this.startActivity(intent);    	
	}else {
		showToast("链接出错无法购买。");
	}
}
 
开发者ID:emop,项目名称:EmopAndroid,代码行数:17,代码来源:ItemActionBar.java


示例4: onResume

import com.baidu.mobstat.StatService; //导入依赖的package包/类
protected void onResume (){
	super.onResume();
	StatService.onResume(this);
	isRunning = true;
	client.appImgLoader.clear();
	MainTabActivity tab = (MainTabActivity)this.getParent();    	
	if(tab != null){
		if(tabIndex < 0){
			tabIndex = tab.tabHost.getCurrentTab();
			Log.d("emop", "save cur tab index:"  + tabIndex);
		}else {
			Log.d("emop", "update tab to:"  + tabIndex);
			tab.activeTab(tabIndex);
		}
	}    	
}
 
开发者ID:emop,项目名称:EmopAndroid,代码行数:17,代码来源:BaseActivity.java


示例5: doKeywordSearch

import com.baidu.mobstat.StatService; //导入依赖的package包/类
public void doKeywordSearch(View v){
	TextView text = (TextView)this.findViewById(R.id.search_keyword);
	String keyword = text.getText().toString();
	if(keyword.trim().length() > 0){
 	String searchUrl = String.format("http://s.m.taobao.com/search.htm?q=%s&pid=mm_%s_0_0",
 			Uri.encode(keyword), client.trackPID);
	
 	StatService.onEvent(this, "search", keyword + "_" + client.trackPID + "_" + client.userId, 1);
 	
 	Intent intent = new Intent().setClass(this, WebViewActivity.class);
 	intent.putExtra("http_url", searchUrl);
 	intent.putExtra("title", keyword);
 	
 	this.startActivity(intent);
	}else {
		showToast("请输入需要搜索的关键词。");
	}
}
 
开发者ID:emop,项目名称:EmopAndroid,代码行数:19,代码来源:CateListActivity.java


示例6: onCreate

import com.baidu.mobstat.StatService; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);
    StatService.setDebugOn(true);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);


    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                    .setAction("Action", null).show();
        }
    });


    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    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);
    navigationView.setNavigationItemSelectedListener(this);

    initUI();
    //throw new NullPointerException();
}
 
开发者ID:PlutoArchitecture,项目名称:Pluto-Android,代码行数:33,代码来源:MainActivity.java


示例7: onCreateView

import com.baidu.mobstat.StatService; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_mobile_info, container, false);
    ButterKnife.bind(this, rootView);

    StatService.onEvent(getContext(), "local_info", "pass", 1);
    listView.setAdapter(new ArrayAdapter<>(getContext(), android.R.layout.simple_list_item_1, properties));
    return rootView;
}
 
开发者ID:Lee-swifter,项目名称:UToolBox,代码行数:11,代码来源:MobileInfoFragment.java


示例8: onBindViewHolder

import com.baidu.mobstat.StatService; //导入依赖的package包/类
@Override
public void onBindViewHolder(final TvViewHolder holder, int position) {
    holder.setText(list.get(position).name);
    holder.itemView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            StatService.onEvent(context, "tv_query_2", "pass", 1);

            Intent intent = new Intent(context, TvChannelActivity.class);
            intent.putExtra(TvChannelActivity.TV_CATEGORY_INTENT, list.get(holder.getAdapterPosition()));
            context.startActivity(intent);
        }
    });
}
 
开发者ID:Lee-swifter,项目名称:UToolBox,代码行数:15,代码来源:TvCategoryAdapter.java


示例9: goShopBuy

import com.baidu.mobstat.StatService; //导入依赖的package包/类
public void goShopBuy(){
	if(shopId != null && shopId.length() > 1 && shopId.length() < 10 && loaded){
		String url = String.format("http://shop%s.taobao.com/", shopId);
		if(shortUrl != null && shortUrl.length() > 0){
			url = "http://c.emop.cn/c/" + shortUrl + "?from=app";
		}
 	StatService.onEvent(getActivity(), "go_shop", shopId + "_" + "no_short", 1);
 	Intent intent = new Intent().setClass(getActivity(), WebViewActivity.class);
 	intent.putExtra("http_url", url);
 	this.startActivity(intent);    	
	}else {
		Toast.makeText(getActivity(), "店铺信息加载中,稍后再试。", Toast.LENGTH_SHORT).show();
	}
}
 
开发者ID:emop,项目名称:EmopAndroid,代码行数:15,代码来源:ShopSummaryFragment.java


示例10: onCreate

import com.baidu.mobstat.StatService; //导入依赖的package包/类
@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);

      setContentView(R.layout.guang_item_list_view);        

      Intent intent = this.getIntent();
  	dataUri = intent.getData();
  	String title = intent.getStringExtra("title");
  	if(title != null && title.trim().length() >0){
          TextView v = (TextView)findViewById(R.id.title);
          v.setText(title);    		
  	}

  	initWaterFallLayout();
waterfallView.showHeadLoader();

  	errorView = (LinearLayout)this.findViewById(R.id.error_view);
  	List<String> seg = dataUri.getPathSegments();
  	if(seg.size() > 2){
  		StatService.onEvent(this, seg.get(0) + "_" + seg.get(1), "view", 1);
  	}
  	
  	View tab = findViewById(R.id.nav_fav_tabs);
  	if(tab != null){
  		tab.setVisibility(View.GONE);
  	}
  }
 
开发者ID:emop,项目名称:EmopAndroid,代码行数:29,代码来源:GuangItemListActivity.java


示例11: goBuy

import com.baidu.mobstat.StatService; //导入依赖的package包/类
private void goBuy(){
	StatService.onEvent(this, "go_taobao", numId + "_" + shortKey + "_" + client.userId, 1);
	
	String url = "http://c.emop.cn/c/" + shortKey + "?from=app";
	if(fromMobile){
		url += "&auto_mobile=n";
	}else {
		url += "&auto_mobile=y";    		
	}
	Intent intent = new Intent().setClass(this, WebViewActivity.class);
	intent.putExtra("http_url", url);
	intent.putExtra("taoke_num_iid", numId);
	this.startActivity(intent);    	
}
 
开发者ID:emop,项目名称:EmopAndroid,代码行数:15,代码来源:TaokeItemDetailActivity.java


示例12: onShareToWeibo

import com.baidu.mobstat.StatService; //导入依赖的package包/类
public void onShareToWeibo(View v){
  	String trackId = "0";
  	if(client.trackUserId != null && client.trackUserId.trim().length() > 0){
  		trackId = client.trackUserId;
  	}
String link = String.format(Constants.WEB_LINK, trackId, weiboId, shortKey);
StatService.onEvent(TaokeItemDetailActivity.this, "share_to_wx", numId + "_" + shortKey + "_" + client.userId, 1);

Intent intent = new Intent();			
intent.setClass(this, ShareToWeiboActivity.class);
intent.putExtra("text", text);
intent.putExtra("link", link);
intent.putExtra("picUrl", this.picUrl);		
startActivity(intent);
  }
 
开发者ID:emop,项目名称:EmopAndroid,代码行数:16,代码来源:TaokeItemDetailActivity.java


示例13: onResume

import com.baidu.mobstat.StatService; //导入依赖的package包/类
public void onResume() {
	super.onResume();
	System.out.println("FragmentDemoActivity-->onResume");
	/**
	 * 页面起始(注意: 每个Activity中都需要添加,如果有继承的父Activity中已经添加了该调用,那么子Activity中务必不能添加)
	 * 如果该FragmentActivity包含了几个全页面的fragment,那么可以在fragment里面加入就可以了,这里可以不加入。如果不加入将不会记录该Activity页面。
	 */
	StatService.onResume(this);
}
 
开发者ID:sprintwind,项目名称:PacketCaptureTool,代码行数:10,代码来源:MainActivity.java


示例14: onPause

import com.baidu.mobstat.StatService; //导入依赖的package包/类
public void onPause() {
	super.onPause();
	System.out.println("FragmentDemoActivity-->onPause");
	/**
	 * 页面结束(注意: 每个Activity中都需要添加,如果有继承的父Activity中已经添加了该调用,那么子Activity中务必不能添加)
	 * 如果该FragmentActivity包含了几个全页面的fragment,那么可以在fragment里面加入就可以了,这里可以不加入。如果不加入将不会记录该Activity页面。
	 */
	StatService.onPause(this);
}
 
开发者ID:sprintwind,项目名称:PacketCaptureTool,代码行数:10,代码来源:MainActivity.java


示例15: onResume

import com.baidu.mobstat.StatService; //导入依赖的package包/类
@Override
protected void onResume() {
    super.onResume();
    StatService.onResume(this);
}
 
开发者ID:PlutoArchitecture,项目名称:Pluto-Android,代码行数:6,代码来源:PlutoFileCacheExample.java


示例16: onPause

import com.baidu.mobstat.StatService; //导入依赖的package包/类
@Override
protected void onPause() {
    super.onPause();
    StatService.onPause(this);
}
 
开发者ID:PlutoArchitecture,项目名称:Pluto-Android,代码行数:6,代码来源:PlutoFileCacheExample.java


示例17: onResume

import com.baidu.mobstat.StatService; //导入依赖的package包/类
@Override
protected void onResume() {
    super.onResume();
    //TODO:百度统计_统计页面
    StatService.onResume(FeedbackActivity.this);
}
 
开发者ID:yanweijia,项目名称:dytt,代码行数:7,代码来源:FeedbackActivity.java


示例18: onPause

import com.baidu.mobstat.StatService; //导入依赖的package包/类
@Override
protected void onPause() {
    super.onPause();
    //TODO:百度统计_统计页面
    StatService.onPause(FeedbackActivity.this);
}
 
开发者ID:yanweijia,项目名称:dytt,代码行数:7,代码来源:FeedbackActivity.java


示例19: onCreate

import com.baidu.mobstat.StatService; //导入依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        //TODO:百度统计初始化
        StatService.setSessionTimeOut(30);  //两次启动应用30s视为第二次启动
        StatService.setLogSenderDelayed(0); //崩溃后延迟0秒发送崩溃日志

        /** 代码方式添加广告,如果您使用XML配置方式添加广告,不需要以下代码 **/
//        AdsMogoLayout adsMogoLayoutCode = new AdsMogoLayout(this, "253352909fb3459babbff4adc49ca4ab");
//        FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT);
//        //设置广告出现的位置(悬浮于底部)
//        params.bottomMargin = 0;
//        adsMogoLayoutCode.setAdsMogoListener(new AdsMogoListener() {
//            @Override
//            public void onInitFinish() {}
//            @Override
//            public void onRequestAd(String s) {}
//            @Override
//            public void onRealClickAd() {}
//            @Override
//            public void onReceiveAd(ViewGroup viewGroup, String s) {}
//            @Override
//            public void onFailedReceiveAd() {}
//            @Override
//            public void onClickAd(String s) {}
//            @Override
//            public boolean onCloseAd() {return false;}
//            @Override
//            public void onCloseMogoDialog() {}
//            @Override
//            public Class getCustomEvemtPlatformAdapterClass(AdsMogoCustomEventPlatformEnum adsMogoCustomEventPlatformEnum) {return null;}
//        });
//        params.gravity = Gravity.BOTTOM;
//        addContentView(adsMogoLayoutCode,params);
        /***********************         代码添加广告结束         ************************/

        BottomNavigationBar bottomNavigationBar = (BottomNavigationBar) findViewById(R.id.bottom_navigation_bar);
        bottomNavigationBar.setMode(BottomNavigationBar.MODE_FIXED);
        bottomNavigationBar
                .setBackgroundStyle(BottomNavigationBar.BACKGROUND_STYLE_STATIC
                );

        bottomNavigationBar.addItem(new BottomNavigationItem(R.mipmap.ic_home_white_24dp, R.string.newMovie).setActiveColorResource(R.color.orange))
                .addItem(new BottomNavigationItem(R.mipmap.ic_find_replace_white_24dp, R.string.search).setActiveColorResource(R.color.teal))
                .addItem(new BottomNavigationItem(R.mipmap.ic_setting, R.string.setting).setActiveColorResource(R.color.blue))
                .setFirstSelectedPosition(0)
                .initialise();

        fragments = getFragments();
        setDefaultFragment();
        bottomNavigationBar.setTabSelectedListener(this);
    }
 
开发者ID:yanweijia,项目名称:dytt,代码行数:55,代码来源:MainActivity.java


示例20: onResume

import com.baidu.mobstat.StatService; //导入依赖的package包/类
@Override
protected void onResume() {
    super.onResume();
    //TODO:百度统计_统计页面
    StatService.onResume(MainActivity.this);
}
 
开发者ID:yanweijia,项目名称:dytt,代码行数:7,代码来源:MainActivity.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Span类代码示例发布时间:2022-05-22
下一篇:
Java CharsetUtil类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap