Search in sources :

Example 1 with JobParameters

use of org.whispersystems.jobqueue.JobParameters in project Signal-Android by WhisperSystems.

the class PushSendJob method constructParameters.

protected static JobParameters constructParameters(Context context, String destination) {
    JobParameters.Builder builder = JobParameters.newBuilder();
    builder.withPersistence();
    builder.withGroupId(destination);
    builder.withRequirement(new MasterSecretRequirement(context));
    builder.withRequirement(new NetworkRequirement(context));
    builder.withRetryCount(5);
    return builder.create();
}
Also used : MasterSecretRequirement(org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement) NetworkRequirement(org.whispersystems.jobqueue.requirements.NetworkRequirement) JobParameters(org.whispersystems.jobqueue.JobParameters)

Aggregations

MasterSecretRequirement (org.thoughtcrime.securesms.jobs.requirements.MasterSecretRequirement)1 JobParameters (org.whispersystems.jobqueue.JobParameters)1 NetworkRequirement (org.whispersystems.jobqueue.requirements.NetworkRequirement)1