public class

GooglePlusUtil

extends Object
java.lang.Object
   ↳ com.google.android.gms.plus.GooglePlusUtil

Class Overview

Utility class for verifying that the Google+ app is available and up-to-date on this device.

Summary

Constants
int APP_DISABLED Status code indicating the Google+ app is installed, but disabled.
int APP_MISSING Status code indicating the Google+ app is not installed.
int APP_UPDATE_REQUIRED Status code indicating the Google+ app is installed, but is older than the version required.
String GOOGLE_PLUS_PACKAGE The package name of the Google+ Android app.
String PLATFORM_LOGGING_TAG Property to enable logging across the Google+ platform for Android.
int SUCCESS Status code indicating the Google+ app is installed and up-to-date.
Public Methods
static int checkGooglePlusApp(Context context)
Checks if the version of the Google+ app installed on this device is up-to-date.
static Dialog getErrorDialog(int errorCode, Activity activity, int requestCode)
Returns a dialog to address the provided errorCode.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int APP_DISABLED

Status code indicating the Google+ app is installed, but disabled.

Constant Value: 3 (0x00000003)

public static final int APP_MISSING

Status code indicating the Google+ app is not installed.

Constant Value: 1 (0x00000001)

public static final int APP_UPDATE_REQUIRED

Status code indicating the Google+ app is installed, but is older than the version required.

Constant Value: 2 (0x00000002)

public static final String GOOGLE_PLUS_PACKAGE

The package name of the Google+ Android app.

Constant Value: "com.google.android.apps.plus"

public static final String PLATFORM_LOGGING_TAG

Property to enable logging across the Google+ platform for Android.

To enable logging:
adb shell setprop log.tag.GooglePlusPlatform VERBOSE

To disable logging:
adb shell setprop log.tag.GooglePlusPlatform ""

Constant Value: "GooglePlusPlatform"

public static final int SUCCESS

Status code indicating the Google+ app is installed and up-to-date.

Constant Value: 0 (0x00000000)

Public Methods

public static int checkGooglePlusApp (Context context)

Checks if the version of the Google+ app installed on this device is up-to-date.

Parameters
context The context.
Returns

public static Dialog getErrorDialog (int errorCode, Activity activity, int requestCode)

Returns a dialog to address the provided errorCode. Upon confirmation, the user is directed to either the Google Play Store or the System App Settings screen to resolve the error.

Parameters
errorCode error code returned by checkGooglePlusApp(Context) call. If errorCode is SUCCESS then null is returned.
activity parent activity for creating the dialog, also used for identifying language to display dialog in.
requestCode The requestCode given when calling startActivityForResult(Intent, int).