public class FeedbackManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
NEW_ANSWER_NOTIFICATION_ID
The id of the new feedback answer notification.
|
static java.lang.String |
NOTIFICATION_CHANNEL_ID
Notification channel id.
|
static int |
SCREENSHOT_NOTIFICATION_ID
The id of the notification to take a screenshot.
|
| Constructor and Description |
|---|
FeedbackManager() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkForAnswersAndNotify(android.content.Context context)
Checks if an answer to the feedback is available and if yes notifies the listener or
creates a system notification.
|
static FeedbackManagerListener |
getLastListener()
Returns the last listener which has been registered with any Feedback manager.
|
static FeedbackUserDataElement |
getRequireUserEmail()
Returns the required setting for the user email property.
|
static FeedbackUserDataElement |
getRequireUserName()
Returns the required setting for the user name property.
|
static void |
register(android.content.Context context)
Registers new Feedback manager.
|
static void |
register(android.content.Context context,
FeedbackManagerListener listener)
Registers new Feedback manager.
|
static void |
register(android.content.Context context,
java.lang.String appIdentifier)
Registers new Feedback manager.
|
static void |
register(android.content.Context context,
java.lang.String appIdentifier,
FeedbackManagerListener listener)
Registers new Feedback manager.
|
static void |
register(android.content.Context context,
java.lang.String urlString,
java.lang.String appIdentifier,
FeedbackManagerListener listener)
Registers new Feedback manager.
|
static void |
setActivityForScreenshot(android.app.Activity activity)
Stores a reference to the given activity to be used for taking a screenshot of it.
|
static void |
setRequireUserEmail(FeedbackUserDataElement requireUserEmail)
Sets the required setting for the user email property
|
static void |
setRequireUserName(FeedbackUserDataElement requireUserName)
Sets the required setting for the user name property
|
static void |
setUserEmail(java.lang.String userEmail)
Sets the user's e-mail to pre-fill the feedback form with
|
static void |
setUserName(java.lang.String userName)
Sets the user's name to pre-fill the feedback form with
|
static void |
showFeedbackActivity(android.content.Context context,
android.os.Bundle extras,
android.net.Uri... attachments)
Starts the
FeedbackActivity |
static void |
showFeedbackActivity(android.content.Context context,
android.net.Uri... attachments)
Starts the
FeedbackActivity |
static void |
takeScreenshot(android.content.Context context)
Takes a screenshot of the currently set activity and stores it in the HockeyApp folder on the
external storage.
|
static void |
unregister()
Unregisters the update manager
|
static void |
unsetCurrentActivityForScreenshot(android.app.Activity activity)
Clears the reference to the activity that was set before by setActivityForScreenshot.
|
public static final int SCREENSHOT_NOTIFICATION_ID
public static final int NEW_ANSWER_NOTIFICATION_ID
public static final java.lang.String NOTIFICATION_CHANNEL_ID
public static void register(android.content.Context context)
context - The context to use. Usually your Activity object.public static void register(android.content.Context context,
FeedbackManagerListener listener)
context - The context to use. Usually your Activity object.listener - Implement for callback functions.public static void register(android.content.Context context,
java.lang.String appIdentifier)
context - The context to use. Usually your Activity object.appIdentifier - App ID of your app on HockeyApp.public static void register(android.content.Context context,
java.lang.String appIdentifier,
FeedbackManagerListener listener)
context - The context to use. Usually your Activity object.appIdentifier - App ID of your app on HockeyApp.listener - Implement for callback functions.public static void register(android.content.Context context,
java.lang.String urlString,
java.lang.String appIdentifier,
FeedbackManagerListener listener)
context - The context to use. Usually your Activity object.urlString - URL of the HockeyApp server.appIdentifier - App ID of your app on HockeyApp.listener - Implement for callback functions.public static void unregister()
public static void showFeedbackActivity(android.content.Context context,
android.net.Uri... attachments)
FeedbackActivitycontext - Context objectattachments - the optional attachment Urispublic static void showFeedbackActivity(android.content.Context context,
android.os.Bundle extras,
android.net.Uri... attachments)
FeedbackActivitycontext - Context objectattachments - the optional attachment Urisextras - a bundle to be added to the Intent that starts the FeedbackActivity instancepublic static void checkForAnswersAndNotify(android.content.Context context)
context - the context to usepublic static FeedbackManagerListener getLastListener()
public static FeedbackUserDataElement getRequireUserName()
public static void setRequireUserName(FeedbackUserDataElement requireUserName)
requireUserName - whether the user name property should be requiredpublic static FeedbackUserDataElement getRequireUserEmail()
public static void setRequireUserEmail(FeedbackUserDataElement requireUserEmail)
requireUserEmail - whether the user email property should be requiredpublic static void setUserName(java.lang.String userName)
userName - user's namepublic static void setUserEmail(java.lang.String userEmail)
userEmail - user's e-mailpublic static void setActivityForScreenshot(android.app.Activity activity)
activity - Activity objectpublic static void unsetCurrentActivityForScreenshot(android.app.Activity activity)
activity - activity for screenshotpublic static void takeScreenshot(android.content.Context context)
context - toast messages will be displayed using this context