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

Control how malware is scanned on the device. More...

Description

By default malware is automatically scanned within applications targeting Android 10 and below. If your application targets Android 11 (API level 30) you will need to add the required Android permission for your application to be able to query all packages. See Android Developer - Package Visibility.

A scan is triggered any time a change in the installed application on the device is detected. By default Wi-Fi and Cellular networks are used to score applications against the BlackBerry Cloud. Normally assessment only requires a hash of the binary to be sent, but if the application has not been seen by BlackBerry before, i.e. it's a custom app, then the full APK is required to be uploaded. When upload is required the default setting is to only upload over Wi-Fi and uploads are capped at 1000 MB per month.

To change these default settings, call ManageRules.setMalwareScanRules using the rules documented in the Builder class.

Classes

class  Builder
 Helps to construct MalwareScanRules that control how malware is scanned. More...
 
enum  MalwareScanTrigger
 Enumeration defining how a malware scan is triggered. More...
 
enum  UploadType
 Enumeration defining what type of network should be used when uploading apps or binaries to the BlackBerry Cloud for scanning. More...
 

Public Member Functions

boolean isMalwareScanningEnabled ()
 True if malware scanning is enabled. More...
 
UploadType getUploadType ()
 Control which network will be used to upload applications which require scanning. More...
 
MalwareScanTrigger getScanTrigger ()
 Control how a scan will be triggered. More...
 
int getUploadItemSizeLimit (UploadType uploadType)
 Define the maximum application file size in MB per type of upload. More...
 
int getUploadMonthlySizeLimit (UploadType uploadType)
 Define the maximum data permitted to upload in MBs per month for each type of upload. More...
 

Member Function Documentation

◆ isMalwareScanningEnabled()

boolean isMalwareScanningEnabled ( )

True if malware scanning is enabled.

◆ getUploadType()

UploadType getUploadType ( )

The default setting is to use only Wi-Fi networks.

◆ getScanTrigger()

MalwareScanTrigger getScanTrigger ( )

Define when to run a malware scan. The default settings is CONTINOUS which means that new or updated applications are immediately scanned.

◆ getUploadItemSizeLimit()

int getUploadItemSizeLimit ( UploadType  uploadType)

The default setting limits the maximum APK size to 50MB on cellular and 100MB on WiFi.

◆ getUploadMonthlySizeLimit()

int getUploadMonthlySizeLimit ( UploadType  uploadType)

The default setting limits upload on cellular to 500MBs per month and 1GB on WiFi.