本文整理汇总了Java中org.whispersystems.jobqueue.requirements.NetworkRequirement类的典型用法代码示例。如果您正苦于以下问题:Java NetworkRequirement类的具体用法?Java NetworkRequirement怎么用?Java NetworkRequirement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NetworkRequirement类属于org.whispersystems.jobqueue.requirements包,在下文中一共展示了NetworkRequirement类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreate
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
ApplicationContext.getInstance(this).injectDependencies(this);
networkRequirement = new NetworkRequirement(this);
networkRequirementProvider = new NetworkRequirementProvider(this);
networkRequirementProvider.setListener(this);
retrievalThread = new MessageRetrievalThread();
retrievalThread.start();
setForegroundIfNecessary();
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:16,代码来源:MessageRetrievalService.java
示例2: DirectoryRefreshJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public DirectoryRefreshJob(@NonNull Context context,
@Nullable MasterSecret masterSecret,
@Nullable Recipients recipients)
{
super(context, JobParameters.newBuilder()
.withGroupId(DirectoryRefreshJob.class.getSimpleName())
.withRequirement(new NetworkRequirement(context))
.create());
this.recipients = recipients;
this.masterSecret = masterSecret;
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:13,代码来源:DirectoryRefreshJob.java
示例3: constructParameters
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
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();
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:11,代码来源:PushSendJob.java
示例4: MultiDeviceBlockedUpdateJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public MultiDeviceBlockedUpdateJob(Context context) {
super(context, JobParameters.newBuilder()
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withGroupId(MultiDeviceBlockedUpdateJob.class.getSimpleName())
.withPersistence()
.create());
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:9,代码来源:MultiDeviceBlockedUpdateJob.java
示例5: MultiDeviceGroupUpdateJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public MultiDeviceGroupUpdateJob(Context context) {
super(context, JobParameters.newBuilder()
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withGroupId(MultiDeviceGroupUpdateJob.class.getSimpleName())
.withPersistence()
.create());
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:9,代码来源:MultiDeviceGroupUpdateJob.java
示例6: RefreshAttributesJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public RefreshAttributesJob(Context context) {
super(context, JobParameters.newBuilder()
.withPersistence()
.withRequirement(new NetworkRequirement(context))
.withWakeLock(true)
.withGroupId(RefreshAttributesJob.class.getName())
.create());
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:9,代码来源:RefreshAttributesJob.java
示例7: DeliveryReceiptJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public DeliveryReceiptJob(Context context, String destination, long timestamp, String relay) {
super(context, JobParameters.newBuilder()
.withRequirement(new NetworkRequirement(context))
.withPersistence()
.withRetryCount(50)
.create());
this.destination = destination;
this.timestamp = timestamp;
this.relay = relay;
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:12,代码来源:DeliveryReceiptJob.java
示例8: PushGroupUpdateJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public PushGroupUpdateJob(Context context, String source, byte[] groupId) {
super(context, JobParameters.newBuilder()
.withPersistence()
.withRequirement(new NetworkRequirement(context))
.withRetryCount(50)
.create());
this.source = source;
this.groupId = groupId;
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:11,代码来源:PushGroupUpdateJob.java
示例9: CreateSignedPreKeyJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public CreateSignedPreKeyJob(Context context) {
super(context, JobParameters.newBuilder()
.withPersistence()
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withGroupId(CreateSignedPreKeyJob.class.getSimpleName())
.create());
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:9,代码来源:CreateSignedPreKeyJob.java
示例10: isPresent
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
@Override
public boolean isPresent() {
NetworkRequirement networkRequirement = new NetworkRequirement(context);
ServiceRequirement serviceRequirement = new ServiceRequirement(context);
return networkRequirement.isPresent() || serviceRequirement.isPresent();
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:8,代码来源:NetworkOrServiceRequirement.java
示例11: MultiDeviceContactUpdateJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public MultiDeviceContactUpdateJob(Context context, long recipientId) {
super(context, JobParameters.newBuilder()
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withGroupId(MultiDeviceContactUpdateJob.class.getSimpleName())
.withPersistence()
.create());
this.recipientId = recipientId;
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:11,代码来源:MultiDeviceContactUpdateJob.java
示例12: RefreshPreKeysJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public RefreshPreKeysJob(Context context) {
super(context, JobParameters.newBuilder()
.withGroupId(RefreshPreKeysJob.class.getSimpleName())
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withRetryCount(5)
.create());
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:9,代码来源:RefreshPreKeysJob.java
示例13: RequestGroupInfoJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public RequestGroupInfoJob(@NonNull Context context, @NonNull String source, @NonNull byte[] groupId) {
super(context, JobParameters.newBuilder()
.withRequirement(new NetworkRequirement(context))
.withPersistence()
.withRetryCount(50)
.create());
this.source = source;
this.groupId = groupId;
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:11,代码来源:RequestGroupInfoJob.java
示例14: PushGroupSendJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public PushGroupSendJob(Context context, long messageId, String destination, long filterRecipientId,
Recipients destRecipients) {
super(context, JobParameters.newBuilder()
.withPersistence()
.withGroupId(destination)
.withRequirement(new MasterSecretRequirement(context))
.withRequirement(new NetworkRequirement(context))
.withRetryCount(5)
.create());
this.messageId = messageId;
this.filterRecipientId = filterRecipientId;
this.destRecipients = destRecipients;
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:15,代码来源:PushGroupSendJob.java
示例15: MmsSendJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public MmsSendJob(Context context, long messageId) {
super(context, JobParameters.newBuilder()
.withGroupId("mms-operation")
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withPersistence()
.create());
this.messageId = messageId;
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:11,代码来源:MmsSendJob.java
示例16: AttachmentDownloadJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public AttachmentDownloadJob(Context context, long messageId, AttachmentId attachmentId) {
super(context, JobParameters.newBuilder()
.withGroupId(AttachmentDownloadJob.class.getCanonicalName())
.withRequirement(new MasterSecretRequirement(context))
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MediaNetworkRequirement(context, messageId, attachmentId))
.withPersistence()
.create());
this.messageId = messageId;
this.partRowId = attachmentId.getRowId();
this.partUniqueId = attachmentId.getUniqueId();
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:14,代码来源:AttachmentDownloadJob.java
示例17: RotateSignedPreKeyJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public RotateSignedPreKeyJob(Context context) {
super(context, JobParameters.newBuilder()
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withRetryCount(5)
.create());
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:8,代码来源:RotateSignedPreKeyJob.java
示例18: MmsDownloadJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public MmsDownloadJob(Context context, long messageId, long threadId, boolean automatic) {
super(context, JobParameters.newBuilder()
.withPersistence()
.withRequirement(new MasterSecretRequirement(context))
.withRequirement(new NetworkRequirement(context))
.withGroupId("mms-operation")
.withWakeLock(true, 30, TimeUnit.SECONDS)
.create());
this.messageId = messageId;
this.threadId = threadId;
this.automatic = automatic;
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:14,代码来源:MmsDownloadJob.java
示例19: MultiDeviceReadUpdateJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public MultiDeviceReadUpdateJob(Context context, List<SyncMessageId> messageIds) {
super(context, JobParameters.newBuilder()
.withRequirement(new NetworkRequirement(context))
.withRequirement(new MasterSecretRequirement(context))
.withPersistence()
.create());
this.messageIds = new LinkedList<>();
for (SyncMessageId messageId : messageIds) {
this.messageIds.add(new SerializableSyncMessageId(messageId.getAddress(), messageId.getTimetamp()));
}
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:14,代码来源:MultiDeviceReadUpdateJob.java
示例20: AvatarDownloadJob
import org.whispersystems.jobqueue.requirements.NetworkRequirement; //导入依赖的package包/类
public AvatarDownloadJob(Context context, byte[] groupId) {
super(context, JobParameters.newBuilder()
.withRequirement(new MasterSecretRequirement(context))
.withRequirement(new NetworkRequirement(context))
.withPersistence()
.create());
this.groupId = groupId;
}
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:10,代码来源:AvatarDownloadJob.java
注:本文中的org.whispersystems.jobqueue.requirements.NetworkRequirement类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论