How to Block the Status Bar Using AIDL Interface

From wizarPOS
Revision as of 21:08, 9 January 2024 by Simon (talk | contribs) (Simon moved page How to block status bar to How to Block the Status Bar Using AIDL Interface: Normalize the title)

Overview

This guide explains how to use the Android Interface Definition Language (AIDL) to block the status bar on Android devices. When blocked, the status bar cannot be swiped down, thus restricting access to system notifications and settings.

Implementation Steps

  1. Connecting to the Service:
    • To block the status bar, connect to the AIDL service.
    • Use 'com.wizarpos.wizarviewagentassistant' as the package name.
    • Set 'com.wizarpos.wizarviewagentassistant.SystemExtApiService' as the class name.
  2. Importing Necessary Components:
    • Your application must import the 'wizarviewagentassistant'.
    • Add the appropriate permissions to your app's Android manifest file to utilize this interface.
  3. Version Requirements:
    • Ensure that the version of 'wizarviewagentassistant' you are using is version 2.10.57 or higher to ensure compatibility and proper functionality.

Permission

The application declares the following permissions in the manifest:

 android.permission.CLOUDPOS_LOCK_STATUS_BAR

API Overview

setStatusBarLocked

void setStatusBarLocked(boolean lock);

Set the status bar locked as true will make the status bar can not be pull down.

Parameters
lock boolean: true for lock, false for disable lock.

Download

AIDL file

Please download the aidl file

Demo

Please download the demo APP