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


Java AndroidCheckinResponse类代码示例

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


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

示例1: checkin

import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinResponse; //导入依赖的package包/类
/**
 * Performs authentication on "ac2dm" service and match up android id,
 * security token and email by checking them in on this server.
 *
 * This function sets check-inded android ID and that can be taken either by
 * using <code>getToken()</code> or from returned
 * {@link AndroidCheckinResponse} instance.
 *
 */
public AndroidCheckinResponse checkin() throws Exception {

	// this first checkin is for generating android-id
	AndroidCheckinResponse checkinResponse = postCheckin(Utils.generateAndroidCheckinRequest()
			.toByteArray());
	this.setAndroidID(BigInteger.valueOf(checkinResponse.getAndroidId()).toString(16).toUpperCase());
	setSecurityToken((BigInteger.valueOf(checkinResponse.getSecurityToken()).toString(16)));

	String c2dmAuth = loginAC2DM();

	AndroidCheckinRequest.Builder checkInbuilder = AndroidCheckinRequest.newBuilder(Utils
			.generateAndroidCheckinRequest());

	AndroidCheckinRequest build = checkInbuilder
			.setId(new BigInteger(this.getAndroidID(), 16).longValue())
			.setSecurityToken(new BigInteger(getSecurityToken(), 16).longValue())
			.addAccountCookie("[" + getEmail() + "]").addAccountCookie(c2dmAuth).build();
	// this is the second checkin to match credentials with android-id
	return postCheckin(build.toByteArray());
}
 
开发者ID:onyxbits,项目名称:dummydroid,代码行数:30,代码来源:GooglePlayAPI.java

示例2: checkin

import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinResponse; //导入依赖的package包/类
/**
 * Performs authentication on "ac2dm" service and match up android id,
 * security token and email by checking them in on this server.
 * 
 * This function sets check-inded android ID and that can be taken either by
 * using <code>getToken()</code> or from returned
 * {@link AndroidCheckinResponse} instance.
 * 
 */
public AndroidCheckinResponse checkin() throws Exception {

	// this first checkin is for generating android-id
	AndroidCheckinResponse checkinResponse = postCheckin(Utils.generateAndroidCheckinRequest()
			.toByteArray());
	this.setAndroidID(BigInteger.valueOf(checkinResponse.getAndroidId()).toString(16));
	setSecurityToken((BigInteger.valueOf(checkinResponse.getSecurityToken()).toString(16)));

	String c2dmAuth = loginAC2DM();
	//login();
	//String c2dmAuth= getToken();

	AndroidCheckinRequest.Builder checkInbuilder = AndroidCheckinRequest.newBuilder(Utils
			.generateAndroidCheckinRequest());

	AndroidCheckinRequest build = checkInbuilder
			.setId(new BigInteger(this.getAndroidID(), 16).longValue())
			.setSecurityToken(new BigInteger(getSecurityToken(), 16).longValue())
			.addAccountCookie("[" + getEmail() + "]").addAccountCookie(c2dmAuth).build();
	// this is the second checkin to match credentials with android-id
	return postCheckin(build.toByteArray());
}
 
开发者ID:onyxbits,项目名称:raccoon4,代码行数:32,代码来源:GooglePlayAPI.java

示例3: checkin

import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinResponse; //导入依赖的package包/类
/**
 * Performs authentication on "ac2dm" service and match up android id,
 * security token and email by checking them in on this server.
 * 
 * This function sets check-inded android ID and that can be taken either by
 * using <code>getToken()</code> or from returned
 * {@link AndroidCheckinResponse} instance.
 * 
 */
public AndroidCheckinResponse checkin() throws Exception {

	// this first checkin is for generating android-id
	AndroidCheckinResponse checkinResponse = postCheckin(Utils.generateAndroidCheckinRequest()
			.toByteArray());
	this.setAndroidID(BigInteger.valueOf(checkinResponse.getAndroidId()).toString(16));
	setSecurityToken((BigInteger.valueOf(checkinResponse.getSecurityToken()).toString(16)));

	String c2dmAuth = loginAC2DM();

	AndroidCheckinRequest.Builder checkInbuilder = AndroidCheckinRequest.newBuilder(Utils
			.generateAndroidCheckinRequest());

	AndroidCheckinRequest build = checkInbuilder
			.setId(new BigInteger(this.getAndroidID(), 16).longValue())
			.setSecurityToken(new BigInteger(getSecurityToken(), 16).longValue())
			.addAccountCookie("[" + getEmail() + "]").addAccountCookie(c2dmAuth).build();
	// this is the second checkin to match credentials with android-id
	return postCheckin(build.toByteArray());
}
 
开发者ID:onyxbits,项目名称:Raccoon,代码行数:30,代码来源:GooglePlayAPI.java

示例4: postCheckin

import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinResponse; //导入依赖的package包/类
/**
 * Posts given check-in request content and returns
 * {@link AndroidCheckinResponse}.
 */
public AndroidCheckinResponse postCheckin(byte[] request) throws IOException {

	HttpEntity httpEntity = executePost(CHECKIN_URL, new ByteArrayEntity(request), new String[][] {
			{ "User-Agent", "Android-Checkin/2.0 (generic JRO03E); gzip" },
			{ "Host", "android.clients.google.com" },
			{ "Content-Type", "application/x-protobuffer" } });
	return AndroidCheckinResponse.parseFrom(httpEntity.getContent());
}
 
开发者ID:onyxbits,项目名称:dummydroid,代码行数:13,代码来源:GooglePlayAPI.java

示例5: postCheckin

import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinResponse; //导入依赖的package包/类
/**
 * Posts given check-in request content and returns
 * {@link AndroidCheckinResponse}.
 */
private AndroidCheckinResponse postCheckin(byte[] request) throws IOException {

	HttpEntity httpEntity = executePost(CHECKIN_URL, new ByteArrayEntity(request), new String[][] {
			{ "User-Agent", "Android-Checkin/2.0 (generic JRO03E); gzip" },
			{ "Host", "android.clients.google.com" },
			{ "Content-Type", "application/x-protobuffer" } });
	return AndroidCheckinResponse.parseFrom(httpEntity.getContent());
}
 
开发者ID:onyxbits,项目名称:raccoon4,代码行数:13,代码来源:GooglePlayAPI.java


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