當前位置: 首頁>>代碼示例>>Java>>正文


Java AndroidCheckinRequest.Builder方法代碼示例

本文整理匯總了Java中com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest.Builder方法的典型用法代碼示例。如果您正苦於以下問題:Java AndroidCheckinRequest.Builder方法的具體用法?Java AndroidCheckinRequest.Builder怎麽用?Java AndroidCheckinRequest.Builder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest的用法示例。


在下文中一共展示了AndroidCheckinRequest.Builder方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: checkin

import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest; //導入方法依賴的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.AndroidCheckinRequest; //導入方法依賴的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.AndroidCheckinRequest; //導入方法依賴的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: getAndroidCheckinRequestBuilder

import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest; //導入方法依賴的package包/類
/**
 * @return the androidCheckinRequestBuilder
 */
public AndroidCheckinRequest.Builder getAndroidCheckinRequestBuilder() {
	if (androidCheckinRequestBuilder == null) {
		String tz = TimeZone.getDefault().getID();
		androidCheckinRequestBuilder = AndroidCheckinRequest.newBuilder().setId(0).setVersion(3)
				.setTimeZone(tz);
	}
	return androidCheckinRequestBuilder;
}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:12,代碼來源:FormData.java

示例5: setAndroidCheckinRequestBuilder

import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest; //導入方法依賴的package包/類
/**
 * @param androidCheckinRequestBuilder
 *          the androidCheckinRequestBuilder to set
 */
public void setAndroidCheckinRequestBuilder(
		AndroidCheckinRequest.Builder androidCheckinRequestBuilder) {
	this.androidCheckinRequestBuilder = androidCheckinRequestBuilder;
}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:9,代碼來源:FormData.java


注:本文中的com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest.Builder方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。