public class CheckinApi
extends java.lang.Object
Real devices are suppose to regularly send statistical data to Play (about once per half an hour). The data consists of things like the device's profile, the networks, it is currently connected to and identifying information like the serial number. In other words: one massive privacy violation, that happens without the user's knowledge or consent. This class implements the checkin api endpoint anyway for the purpose of keeping the GSF ID from going stale.
Modifier and Type | Field and Description |
---|---|
static int |
SETTLE
How long to wait (in milliseconds) after binding a new GSF ID.
|
Constructor and Description |
---|
CheckinApi(ClientProvider cp,
RequestContextProvider rcp) |
CheckinApi(org.apache.hc.client5.http.classic.HttpClient client,
org.apache.hc.core5.http.Header... headers)
Convenience constructor that wraps client in a
DefaultClientProvider and headers in a
DefaultRequestContextProvider . |
Modifier and Type | Method and Description |
---|---|
de.onyxbits.raccoon.proto.AndroidCheckinResponse |
requestBindId(java.util.Locale locale,
java.util.TimeZone timezone,
Device device,
java.lang.String uid,
java.lang.String auth,
long gsfId,
long securityToken)
Bind the GSF ID.
|
de.onyxbits.raccoon.proto.AndroidCheckinResponse |
requestCheckin(java.util.Locale locale,
java.util.TimeZone timezone,
Device device,
long gsfId,
long securityToken,
long lastCheckin)
Android devices are suppose to check in about twice per hour and tell
Google how they are doing.
|
de.onyxbits.raccoon.proto.AndroidCheckinResponse |
requestId(java.util.Locale locale,
java.util.TimeZone timezone,
Device device)
Ask for a new GSF ID to be issued.
|
CheckinApi |
withCellOperator(java.lang.String mccmnc)
https://en.wikipedia.org/wiki/Mobile_country_code
|
CheckinApi |
withSimOperator(java.lang.String mccmnc)
https://en.wikipedia.org/wiki/Mobile_country_code
|
public static final int SETTLE
public CheckinApi(org.apache.hc.client5.http.classic.HttpClient client, org.apache.hc.core5.http.Header... headers)
DefaultClientProvider
and headers in a
DefaultRequestContextProvider
.client
- client for making requests.headers
- headers to add when making a request.public CheckinApi(ClientProvider cp, RequestContextProvider rcp)
cp
- where to get the HttpClient
instance from when a request
method is called.rcp
- called on every request to get headers.public CheckinApi withSimOperator(java.lang.String mccmnc)
mccmnc
- may be null.public CheckinApi withCellOperator(java.lang.String mccmnc)
mccmnc
- may be null.public de.onyxbits.raccoon.proto.AndroidCheckinResponse requestId(java.util.Locale locale, java.util.TimeZone timezone, Device device) throws java.io.IOException
locale
- timezone
- device
- java.io.IOException
public de.onyxbits.raccoon.proto.AndroidCheckinResponse requestBindId(java.util.Locale locale, java.util.TimeZone timezone, Device device, java.lang.String uid, java.lang.String auth, long gsfId, long securityToken) throws java.io.IOException
locale
- timezone
- device
- uid
- auth
- gsfId
- securityToken
- java.io.IOException
public de.onyxbits.raccoon.proto.AndroidCheckinResponse requestCheckin(java.util.Locale locale, java.util.TimeZone timezone, Device device, long gsfId, long securityToken, long lastCheckin) throws java.io.IOException
locale
- timezone
- device
- lastCheckin
- last checkin since the epochjava.io.IOException