This document tracks changes to the API between versions.
Refactored Surveys to use the new Event framework. You should use Apptentive.engage(Activity activity, String eventName) instead of Apptentive.showSurvey()
.
New Survey integration instructions.
Removed Methods |
---|
public static boolean showSurvey(Activity activity, OnSurveyFinishedListener listener, String... tags) |
Added Methods |
---|
public static boolean Apptentive.engage(Activity activity, String eventName) |
public static void setOnSurveyFinishedListener(OnSurveyFinishedListener listener) |
Added support for AWS SNS push notifications
Added Methods |
---|
public static void addAmazonSnsPushIntegration(Context context, String registrationId) |
The Rating Dialog has been rebuilt to use the new unified engage()
method. See the Interactions section of the README for more information.
Removed Methods |
---|
public static void Apptentive.logSignificantEvent(Context context) |
public static boolean showRatingFlowIfConditionsAreMet(Activity activity) |
Added Methods |
---|
public static boolean Apptentive.engage(Activity activity, String eventName) |
Please remove the line <action android:name="android.intent.action.PACKAGE_RESTARTED"/>
action from Apptentive's NetworkStateReceiver in your manifest. This is not needed, and may cause excessive battery drain.
New Methods |
---|
public static void Apptentive.addUrbanAirshipPushIntegration(Context context, String apid) |
public static void setPendingPushNotification(Context context, Intent intent) |
public boolean handleOpenedPushNotification(Activity activity) |
public static void setPendingPushNotification(Context context, Intent intent) |
New Methods |
---|
public static void addIntegration(Context context, String integration, Map<String, String> config) |
public static void addUrbanAirshipPushIntegration(Context context, String apid) |
public static void handleOpenedPushNotification(Activity activity, Intent intent) |
public static boolean isApptentivePushNotification(Intent intent) |
Old Method Signature | New Method Signature |
---|---|
public static void showRatingFlowIfConditionsAreMet(Activity activity) |
public static boolean showRatingFlowIfConditionsAreMet(Activity activity) |
New Methods |
---|
public static void showMessageCenter(Activity activity, Map<String, String> customData) |
To improve the quality of the Apptentive SDK, and to make it easier to integrate, the following API method signatures of Apptentive.java
have been changed or added.
Old Method Signature | New Method Signature |
---|---|
public static void setUserEmail(String email) |
public static void setInitialUserEmail(Context context, String email) |
public static void setCustomData(Map<String, String> customData) |
public static void setCustomDeviceData(Context context, Map<String, String> customDeviceData) |
New Methods |
---|
public static void addCustomDeviceData(Context context, String key, String value) |
public static void removeCustomDeviceData(Context context, String key) |
public static void setCustomPersonData(Context context, Map<String, String> customPersonData) |
public static void addCustomPersonData(Context context, String key, String value) |
public static void removeCustomPersonData(Context context, String key) |
public static int getUnreadMessageCount(Context context) |
The following changes from the 0.6.x series were made.
We are moving over to a unified message center, which is an expansion of the feedback API. We have decided to take the opportunity to clean up the ratings flow API, and simplify how you interact with the SDK in general. Below are detailed changes that have been made to the API, but from a simple perspective, you'll want to:
General setup:
- Replace
Apptentive.getFeedbackModule().addDataField("username", "Sky Kelsey");
with
Map customData = new HashMap();
customData.put("username", "Sky Kelsey");
Apptentive.setCustomData(customData);
- Replace
Apptentive.getRatingModule().setRatingProvider(new AmazonAppstoreRatingProvider());
withApptentive.setRatingProvider(new AmazonAppstoreRatingProvider());
To launch feedback:
- Replace
Apptentive.getFeedbackModule().forceShowFeedbackDialog(YourActivity.this);
withApptentive.showMessageCenter(YourActivity.this);
.
In ratings:
- Replace
Apptentive.getRatingModule().run(YourActivity.this);
withApptentive.showRatingFlowIfConditionsAreMet(YourActivity.this);
- Replace
Apptentive.getRatingModule().logEvent();
withApptentive.logSignificantEvent();
.