com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinResponse

Here are the examples of the java api class com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinResponse taken from open source projects.

1. GooglePlayAPI#checkin()

Project: Raccoon
File: GooglePlayAPI.java
/**
	 * 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());
}

2. GooglePlayAPI#checkin()

Project: google-play-crawler
File: GooglePlayAPI.java
/**
     * 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());
}