- Jun 6, 2020
- 11,559
- 4,422
Hi I needed to detect bots to block and found that can be handled by the activity manager using the functions isRunningInUserTestHarness and isUserAMonkey then I developed a wrapper around.
The following functions are implemented:
The following functions are implemented:
- isRunningInUserTestHarness: Returns "true" If the device Is running in Test Harness Mode.
- getLockTaskModeState: Return the current state of task locking. The three possible outcomes are LOCK_TASK_MODE_NONE, LOCK_TASK_MODE_LOCKED and LOCK_TASK_MODE_PINNED.
- isInLockTaskMode: Return true if is locked.
- isBackgroundRestricted: Query whether the user has enabled background restrictions For this app. true if user has enforced background restrictions for this app, false otherwise. Emits a log warning and return False in case of sdk < 28.
- isLowMemoryKillReportSupported: Whether or not the low memory kill will be reported in. Emits a log warning and return False in case of sdk < 30...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید