本文整理汇总了Java中com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest类的典型用法代码示例。如果您正苦于以下问题:Java AndroidCheckinRequest类的具体用法?Java AndroidCheckinRequest怎么用?Java AndroidCheckinRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AndroidCheckinRequest类属于com.akdeniz.googleplaycrawler.GooglePlay包,在下文中一共展示了AndroidCheckinRequest类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: edit
import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest; //导入依赖的package包/类
@Override
public void edit(FormData formData) {
super.edit(formData);
backwardAction.setEnabled(true);
forwardAction.setEnabled(false);
AndroidCheckinRequest acr = formData.assemble();
// Don't needlessly request new GSF IDs if nothing has changed.
String tmp = acr.toString();
if (!tmp.equals(cached)) {
progress.setVisible(true);
result.setText("");
new CheckinWorker(this, formData).execute();
cached = tmp;
}
}
示例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).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());
}
示例3: generateAndroidCheckinRequest
import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest; //导入依赖的package包/类
/**
* Generates android checkin request with properties of "Galaxy S3".
*
* <a href=
* "http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro25&D=Samsung+GT-I9300+Galaxy+S+III&testgroup=system"
* > http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro25&D=Samsung
* +GT-I9300+Galaxy+S+III&testgroup=system </a>
*/
public static AndroidCheckinRequest generateAndroidCheckinRequest() {
return AndroidCheckinRequest
.newBuilder()
.setId(0)
.setCheckin(
AndroidCheckinProto
.newBuilder()
.setBuild(
AndroidBuildProto.newBuilder()
.setId("google/angler/angler:6.0.1/MTC19T/2741993:user/release-keys")
.setProduct("angler").setCarrier("Google").setRadio("angler-03.61")
.setBootloader("angler-03.51").setClient("android-google")
.setTimestamp(new Date().getTime() / 1000).setGoogleServices(16).setDevice("angler")
.setSdkVersion(23).setModel("angler").setManufacturer("Huawei")
.setBuildProduct("angler").setOtaInstalled(false)).setLastCheckinMsec(0)
.setCellOperator("310260").setSimOperator("310260").setRoaming("mobile-notroaming")
.setUserNumber(0)).setLocale("en_US").setTimeZone("Europe/Amsterdam").setVersion(3)
.setDeviceConfiguration(getDeviceConfigurationProto()).setFragment(0).build();
}
示例4: 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());
}
示例5: generateAndroidCheckinRequest
import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest; //导入依赖的package包/类
/**
* Generates android checkin request with properties of "Galaxy S3".
*
* <a href=
* "http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro25&D=Samsung+GT-I9300+Galaxy+S+III&testgroup=system"
* > http://www.glbenchmark.com/phonedetails.jsp?benchmark=glpro25&D=Samsung
* +GT-I9300+Galaxy+S+III&testgroup=system </a>
*/
public static AndroidCheckinRequest generateAndroidCheckinRequest() {
return AndroidCheckinRequest
.newBuilder()
.setId(0)
.setCheckin(
AndroidCheckinProto
.newBuilder()
.setBuild(
AndroidBuildProto.newBuilder()
.setId("samsung/nobleltejv/noblelte:6.0.1/MMB29K/N920CXXU2BPD6:user/release-keys")
.setProduct("noblelte").setCarrier("Google").setRadio("I9300XXALF2")
.setBootloader("PRIMELA03").setClient("android-google")
.setTimestamp(new Date().getTime() / 1000).setGoogleServices(16).setDevice("noblelte")
.setSdkVersion(23).setModel("SM-N920C").setManufacturer("Samsung")
.setBuildProduct("noblelte").setOtaInstalled(false)).setLastCheckinMsec(0)
.setCellOperator("310260").setSimOperator("310260").setRoaming("mobile-notroaming")
.setUserNumber(0)).setLocale("en_US").setTimeZone("Europe/Berlin").setVersion(3)
.setDeviceConfiguration(getDeviceConfigurationProto()).setFragment(0).build();
}
示例6: 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());
}
示例7: assemble
import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest; //导入依赖的package包/类
public AndroidCheckinRequest assemble() {
getAndroidBuildProtoBuilder();
getAndroidCheckinProtoBuilder();
getAndroidCheckinRequestBuilder();
return androidCheckinRequestBuilder
.setCheckin(androidCheckinProtoBuilder.setBuild(androidBuildProtoBuilder))
.setDeviceConfiguration(getDeviceConfigurationProtoBuilder()).setFragment(0).build();
}
示例8: 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;
}
示例9: setAndroidCheckinRequestBuilder
import com.akdeniz.googleplaycrawler.GooglePlay.AndroidCheckinRequest; //导入依赖的package包/类
/**
* @param androidCheckinRequestBuilder
* the androidCheckinRequestBuilder to set
*/
public void setAndroidCheckinRequestBuilder(
AndroidCheckinRequest.Builder androidCheckinRequestBuilder) {
this.androidCheckinRequestBuilder = androidCheckinRequestBuilder;
}