• BlackBerry Spark
  • Security library for Android applications
ThreatStatus Class Reference

Singleton class providing details of security threats related to the device, application, network, and user. More...


To receive a local broadcast when the ThreatStatus changes, register to intent ACTION_THREAT_STATE_NOTIFICATION.

Public Member Functions

ThreatLevel getOverallThreatLevel ()
 Get the overall level of risk. More...
Threat getThreat (ThreatType ruleType)
 Return the threat information for a specific type of threat. More...
Vector< ThreatgetThreat ()
 Return status of all threats evaluated. More...

Static Public Member Functions

static synchronized ThreatStatus getInstance ()
 Get a reference to the runtime interface object. More...

Static Public Attributes

static final String ACTION_THREAT_STATE_NOTIFICATION = "BBDThreatStatusNotification"
 Intent action to receive a local broadcast concerning ThreatStatus changes. More...

Member Function Documentation

◆ getInstance()

static synchronized ThreatStatus getInstance ( )

Get a reference to the runtime interface object. The ThreatStatus object is a "singleton class"

Reference that can be used to call, for example, ThreatStatus.getOverallThreatLevel.

◆ getOverallThreatLevel()

ThreatLevel getOverallThreatLevel ( )

Return the overall level of risk combining all threat types being evaluated. For example, if any detected threat poses a HIGH risk then the overall threat level will also be deemed to be HIGH.


◆ getThreat() [1/2]

Threat getThreat ( ThreatType  ruleType)

Return details for specific threat type including the risk level, evaluation time and status.

ruleTypeThreatType to be retrieved.
Threat object for the requested ThreatType.
null if ThreatType does not have corresponding Threat object. For example SafeMessaging & SafeBrowsing where Threat level is specific to each check

◆ getThreat() [2/2]

Vector<Threat> getThreat ( )

Return the threat information of all types of threats which are evaluated by the runtime.

A vector Threat for all available types.

Member Data Documentation


final String ACTION_THREAT_STATE_NOTIFICATION = "BBDThreatStatusNotification"

To receive a local broadcast when the ThreatStatus changes register to intent action LibraryInit.ACTION_THREAT_STATE_NOTIFICATION,

Example (Java)

private LibraryInit mSecurity;
IntentFilter filter = new IntentFilter();
mSecurity.registerReceiver(new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
//Receive Threat State Notification
//schedule Application specific actions based on Threat State updates received
}, filter);