• BlackBerry Spark AppSecure
  • Security library for Android applications
  • 0.7.915.0
MalwareScanRules.Builder Class Reference

Helps to construct MalwareScanRules that control how malware is scanned. More...

Description

The following sample code demonstrates how to update the rules.

MalwareScanRules.Builder rulesBuilder = new MalwareScanRules.Builder();
// Permit apps which require scanning to be uploaded on Wi-Fi or Cellular networks
rulesBuilder.allowedUploadType(UploadType.CELLULAR_WIFI);
// Set increased MB limits for uploading apps over cellular mobile network.
int perApkUploadLimit = 75; // Max APK size of 75MB
int monthlyUploadLimit = 750; // Max monthly MB upload of 750MB
rulesBuilder.setUploadSizeLimits(UploadType.CELLULAR, perApkUploadLimit, monthlyUploadLimit);
// Set malware scanning to only be triggered when application starts.
rulesBuilder.scanTrigger(MalwareScanRules.MalwareScanTrigger.INITIAL);
// Build the rules object and set the new rules.
MalwareScanRules malwareScanRules = rulesBuilder.build();
manageRules.setMalwareScanRules(malwareScanRules);

Public Member Functions

Builder scanningEnabled (boolean enabled)
 Set to true to enable malware scanning. More...
 
Builder allowedUploadType (UploadType uploadType)
 Set which network will be used to upload applications for scanning. More...
 
Builder scanTrigger (MalwareScanTrigger scanTrigger)
 Set how a scan will be triggered. More...
 
Builder setUploadSizeLimits (UploadType uploadType, int perAPK, int monthlyLimit)
 Set data upload limits. More...
 
MalwareScanRules build ()
 Creates a MalwareScanRules instance. More...
 

Member Function Documentation

◆ scanningEnabled()

Builder scanningEnabled ( boolean  enabled)

Set to true to enable malware scanning.

◆ allowedUploadType()

Builder allowedUploadType ( UploadType  uploadType)

Set to either use Wi-Fi, Cellular or both types of networks when uploading applications which require scanning.

◆ scanTrigger()

Builder scanTrigger ( MalwareScanTrigger  scanTrigger)

Set whether to trigger a malware scan when other applications on the device are installed or updated (CONTINUOUS), or just once when this application starts (INITIAL)

◆ setUploadSizeLimits()

Builder setUploadSizeLimits ( UploadType  uploadType,
int  perAPK,
int  monthlyLimit 
)

Set per item and monthly data upload limits for WiFi and Cellar in MBs.

◆ build()

MalwareScanRules build ( )

Creates a MalwareScanRules instance.