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


Java StatService.onEvent方法代码示例

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


在下文中一共展示了StatService.onEvent方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: onShareToWX

import com.baidu.mobstat.StatService; //导入方法依赖的package包/类
public void onShareToWX(View v){
  	if(api == null){
  		api = WXAPIFactory.createWXAPI(this, com.emop.client.wxapi.Constants.APP_ID, 
  				false);
  	}
  	if(weiboId == null){
  		showToast("不能分享来自外部应用商品.");
  		return;
  	}
  	if(!api.isWXAppInstalled() || !api.isWXAppSupportAPI()){
  		showToast("没有安装微信应用,不能分享到朋友圈.");
  		return;
  	}
  	if(loading == null){
          loading = new ProgressDialog(this);
          loading.requestWindowFeature(Window.FEATURE_NO_TITLE);
  	}
  	loading.setMessage("正在加载微信...");    		
  	loading.show();

  	String trackId = "0";
  	if(client.trackUserId != null && client.trackUserId.trim().length() > 0){
  		trackId = client.trackUserId;
  	}

String imageURL = String.format(Constants.WEB_LINK, trackId, weiboId, shortKey);

try{
	//WXImageObject imgObj = new WXImageObject();
	//imgObj.imageUrl = imageURL;
	WXWebpageObject webObj = new WXWebpageObject(imageURL);
	
	WXMediaMessage msg = new WXMediaMessage();
	msg.mediaObject = webObj;
	msg.title = "亲,帮忙给点建议";
	msg.description = text;
				
	msg.thumbData = getThumbData(taokePic);
	
	SendMessageToWX.Req req = new SendMessageToWX.Req();
	req.transaction = buildTransaction("img");
	req.message = msg;
	if(api.sendReq(req)){
		StatService.onEvent(TaokeItemDetailActivity.this, "share_to_wx", numId + "_" + shortKey + "_" + client.userId, 1);
	}else {
		showToast("微信分享失败,确认微信已经打开。");
	}
} catch(Exception e) {
	e.printStackTrace();
}
  }
 
开发者ID:emop,项目名称:EmopAndroid,代码行数:52,代码来源:TaokeItemDetailActivity.java


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