public class LoginManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
LOGIN_MODE_ANONYMOUS
The default mode for authorization.
|
static int |
LOGIN_MODE_EMAIL_ONLY
Testers/users need a HockeyApp account and have to provide their email address to use the app.
|
static int |
LOGIN_MODE_EMAIL_PASSWORD
Testers/users need a HockeyApp account and have to provide their email address and password to use the app.
|
static int |
LOGIN_MODE_VALIDATE
Same as LOGIN_MODE_EMAIL_PASSWORD and HockeySDK will check if the user has access to the app.
|
Constructor and Description |
---|
LoginManager() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getLoginEmail(android.content.Context context)
Retrieves the email address that was used for logging in.
|
static void |
register(android.content.Context context,
java.lang.String appSecret,
int mode)
Registers new login manager.
|
static void |
register(android.content.Context context,
java.lang.String appSecret,
int mode,
LoginManagerListener listener)
Registers new login manager.
|
static void |
register(android.content.Context context,
java.lang.String appIdentifier,
java.lang.String appSecret,
int mode,
java.lang.Class<?> activity)
Registers new LoginManager.
|
static void |
register(android.content.Context context,
java.lang.String appIdentifier,
java.lang.String appSecret,
int mode,
LoginManagerListener listener)
Registers new LoginManager.
|
static void |
register(android.content.Context context,
java.lang.String appIdentifier,
java.lang.String appSecret,
java.lang.String urlString,
int mode,
java.lang.Class<?> activity)
Registers new LoginManager.
|
static void |
verifyLogin(android.app.Activity context,
android.content.Intent intent)
Checks the authentication status.
|
public static final int LOGIN_MODE_ANONYMOUS
public static final int LOGIN_MODE_EMAIL_ONLY
public static final int LOGIN_MODE_EMAIL_PASSWORD
public static final int LOGIN_MODE_VALIDATE
public static void register(android.content.Context context, java.lang.String appSecret, int mode)
context
- The context to use. Usually your Activity object. Has to be
of class Activity or subclass for interactive login.appSecret
- The App Secret of your app on HockeyApp.mode
- The login mode to use.public static void register(android.content.Context context, java.lang.String appSecret, int mode, LoginManagerListener listener)
context
- The context to use. Usually your Activity object. Has to be
of class Activity or subclass for interactive login.appSecret
- The App Secret of your app on HockeyApp.mode
- The login mode to use.listener
- Instance of LoginListenerpublic static void register(android.content.Context context, java.lang.String appIdentifier, java.lang.String appSecret, int mode, LoginManagerListener listener)
context
- The context to use. Usually your Activity object.appIdentifier
- The App ID of your app on HockeyApp.appSecret
- The App Secret of your app on HockeyApp.mode
- The login mode.listener
- Instance of LoginListenerpublic static void register(android.content.Context context, java.lang.String appIdentifier, java.lang.String appSecret, int mode, java.lang.Class<?> activity)
context
- The context to use. Usually your Activity object.appIdentifier
- App ID of your app on HockeyApp.appSecret
- The App Secret of your app on HockeyApp.mode
- The Login Mode.activity
- The first activity to be started by your app.public static void register(android.content.Context context, java.lang.String appIdentifier, java.lang.String appSecret, java.lang.String urlString, int mode, java.lang.Class<?> activity)
context
- The context to use. Usually your Activity object.appIdentifier
- App ID of your app on HockeyApp.appSecret
- The App Secret of your app on HockeyApp.urlString
- The URL of the HockeyApp servicemode
- The Login Mode.activity
- The first activity to be started by your app.public static void verifyLogin(android.app.Activity context, android.content.Intent intent)
context
- The activity from which this method is called.intent
- The intent that the activity has been created with.public static java.lang.String getLoginEmail(android.content.Context context)
context
- The context to use. Usually your Activity object.