public class FeedbackManager extends Object
Copyright (c) 2011-2014 Bit Stadium GmbH Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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,
String appIdentifier)
Registers new Feedback manager.
|
static void |
register(android.content.Context context,
String appIdentifier,
FeedbackManagerListener listener)
Registers new Feedback manager.
|
static void |
register(android.content.Context context,
String urlString,
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 |
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 also publishing it to the Android gallery.
|
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 void register(android.content.Context context, 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, 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, String urlString, 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)
FeedbackActivity
context
- Context
objectattachments
- the optional attachment Uri
spublic static void showFeedbackActivity(android.content.Context context, android.os.Bundle extras, android.net.Uri... attachments)
FeedbackActivity
context
- Context
objectattachments
- the optional attachment Uri
sextras
- 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 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 contextCopyright © 2015. All Rights Reserved.