public static void isSurveyAvailable( final ForgeTask task, @ForgeParam("tags") final JsonArray surveyTags) { Log.e("Tags: " + surveyTags.toString()); String[] tags = new String[surveyTags.size()]; for (int i = 0; i < surveyTags.size(); i++) { tags[i] = surveyTags.get(i).getAsString(); } boolean available = Apptentive.isSurveyAvailable(ForgeApp.getActivity(), tags); task.success(available); }
public static void getUnreadMessageCount(final ForgeTask task) { int count = Apptentive.getUnreadMessageCount(ForgeApp.getActivity()); task.success(new JsonPrimitive(count)); }
public static void setInitialUserEmailAddress( final ForgeTask task, @ForgeParam("initialUserEmailAddress") final String initialUserEmailAddress) { Apptentive.setInitialUserEmail(ForgeApp.getActivity(), initialUserEmailAddress); task.success(); }