Google Play Services are a unified SDK that allow you to quickly and easily integrate Google features into your Android apps. Being rolled out to millions of Android devices, they provide easy access to Google services and allow you to innovate quickly.
In this session, I will give you a rundown of the core services available via Google Play Services and give you an overview of the new APIs that ship as a part of Google Play Services. We will also have a look at some of the lesser known features that will enable you to build apps that truly rock.
5. Google Play Services
• Set of APIs by Google
• Available for Devices running
Gingerbread and higher
6. Google Play Services
• Set of APIs by Google
• Available for Devices running
Gingerbread and higher
• Access the latest in Google
technology
7. Google Play Services
• Set of APIs by Google
• Available for Devices running
Gingerbread and higher
• Access the latest in Google
technology
• Frequent updates
8. Google Play Services
• Set of APIs by Google
• Available for Devices running
Gingerbread and higher
• Access the latest in Google
technology
• Frequent updates
• One standard way to connect
and authorise
9. Google Play Services Library
Device
Drive Service
Google Play Services
Your App
Google API Client
Maps
Google+
Wallet
Games Services
33. Callbacks - The Good
BaseActivity.cs
public class BaseDemoActivity : Activity,
IGoogleApiClientConnectionCallbacks
{
public virtual void OnConnected (Bundle connectionHint)
{
Log.Debug (logTag, "Google API client connected.”);
// let the good stuff happen here
}
public void OnConnectionSuspended (int cause)
{
Log.Debug (logTag, "Google API client connection suspended.");
// deactivate UI components, etc.
}
}
34. Callbacks - The Bad
BaseActivity.cs
public class BaseDemoActivity : Activity,
IGoogleApiClientOnConnectionFailedListener
{
public void OnConnectionFailed (ConnectionResult result)
{
if (result.HasResolution) {
try {
result.StartResolutionForResult (this, RequestCodeResolution);
} catch (IntentSender.SendIntentException ex) {
Log.Error (logTag, "Exception while starting resolution activity", ex);
}
} else {
GooglePlayServicesUtil.GetErrorDialog (result.ErrorCode, this, 0).Show ();
return;
}
}
}
35. Callbacks - The Bad
BaseActivity.cs
public class BaseDemoActivity : Activity,
IGoogleApiClientOnConnectionFailedListener
{
public void OnConnectionFailed (ConnectionResult result)
{
if (result.HasResolution) {
try {
result.StartResolutionForResult (this, RequestCodeResolution);
} catch (IntentSender.SendIntentException ex) {
Log.Error (logTag, "Exception while starting resolution activity", ex);
}
} else {
GooglePlayServicesUtil.GetErrorDialog (result.ErrorCode, this, 0).Show ();
return;
}
}
}
Try to resolve this error by asking
for the user’s consent
111. Google+ OTA
• Use Google+ Sign-in button
• Set App package name on the
button
112. Google+ OTA
• Use Google+ Sign-in button
• Set App package name on the
button
• Use the same scopes on web
and in the app
113. Google+ OTA
• Use Google+ Sign-in button
• Set App package name on the
button
• Use the same scopes on web
and in the app
• Configure consent screen
114. Google+ OTA
• Use Google+ Sign-in button
• Set App package name on the
button
• Use the same scopes on web
and in the app
• Configure consent screen
• Meet quality thresholds
131. What’s next?
Material Android Design from Concept to Implementation (I + II)
Thursday, 1 pm (Franklin Salon)
C# is in My Ears and in My Eyes
Thursday, 4:15 pm (Linnaeus Salon)
youtube.com/GoogleDevelopers