use of com.aware.ui.esms.ESM_Number in project aware-client by denzilferreira.
the class TestESM method testNotificationRetries.
/**
* This tests the notification re-trigger x times after y seconds have elapsed.
*
* @param context
*/
private void testNotificationRetries(Context context) {
ESMFactory factory = new ESMFactory();
try {
ESM_Number number = new ESM_Number();
// 5 minutes
number.setNotificationTimeout(5 * 60).setNotificationRetry(// notify the user 3 times, so notification alive for 3 * 5 minutes = 15 minutes
3).setTitle("Lucky number?").setInstructions("Pick one.");
factory.addESM(number);
ESM.queueESM(context, factory.build());
} catch (JSONException e) {
e.printStackTrace();
}
}
use of com.aware.ui.esms.ESM_Number in project aware-client by denzilferreira.
the class TestESM method testNumeric.
private void testNumeric(Context context) {
ESMFactory factory = new ESMFactory();
try {
ESM_Number q1 = new ESM_Number();
q1.setTitle("Number").setInstructions("We only accept a number!").setSubmitButton("OK").setTrigger("AWARE Test");
factory.addESM(q1);
ESM.queueESM(context, factory.build());
} catch (JSONException e) {
e.printStackTrace();
}
}
Aggregations