本文整理汇总了Java中com.meituan.android.walle.ChannelInfo类的典型用法代码示例。如果您正苦于以下问题:Java ChannelInfo类的具体用法?Java ChannelInfo怎么用?Java ChannelInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ChannelInfo类属于com.meituan.android.walle包,在下文中一共展示了ChannelInfo类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readChannel
import com.meituan.android.walle.ChannelInfo; //导入依赖的package包/类
/**
* 获取渠道信息
*/
public static ChannelInfo readChannel(Context app) {
@SuppressWarnings("UnusedAssignment") final long startTime = System.currentTimeMillis();
return WalleChannelReader.getChannelInfo(app);
// TODO
/* if (channelInfo != null) {
tv.setText(channelInfo.getChannel() + "\n" + channelInfo.getExtraInfo());
}
Toast.makeText(this, "ChannelReader takes " + (System.currentTimeMillis() - startTime) + " milliseconds", Toast.LENGTH_SHORT).show();*/
}
示例2: readChannel
import com.meituan.android.walle.ChannelInfo; //导入依赖的package包/类
private void readChannel() {
final TextView tv = (TextView) findViewById(R.id.tv_channel);
final long startTime = System.currentTimeMillis();
final ChannelInfo channelInfo = WalleChannelReader.getChannelInfo(this.getApplicationContext());
if (channelInfo != null) {
tv.setText(channelInfo.getChannel() + "\n" + channelInfo.getExtraInfo());
}
Toast.makeText(this, "ChannelReader takes " + (System.currentTimeMillis() - startTime) + " milliseconds", Toast.LENGTH_SHORT).show();
}
示例3: readChannel
import com.meituan.android.walle.ChannelInfo; //导入依赖的package包/类
private void readChannel() {
final long startTime = System.currentTimeMillis();
final ChannelInfo channelInfo = WalleChannelReader.getChannelInfo(this.getApplicationContext());
if (channelInfo != null) {
Log.v("channel:", channelInfo.getChannel() + "\n" + channelInfo.getExtraInfo());
}
}
示例4: setChannel
import com.meituan.android.walle.ChannelInfo; //导入依赖的package包/类
public static void setChannel(Context app) {
if (TextUtils.isEmpty(SPManager.getInstance().getChannel())) {
ChannelInfo channelInfo = SysUtils.readChannel(app);
SPManager.getInstance().putChannel(channelInfo != null ? channelInfo.getChannel() : "200001");
}
}