Skip to content

Commit 913010f

Browse files
feat: screen capture prevention and detection (#54)
* add screen capture passive and active detection * add comments for blockScreenCapture and isScreenCaptureBlocked * add comments for blockScreenCapture and isScreenCaptureBlocked * update CHANGELOG.md * update ScreenProtector.kt * update screen protector handler * apply screen capture comments * fix CI * fix screen capture callbacks initialization after making sure Talsec start * fix CI bugs * fix CI bugs * code review * release: freeRASP 7.4.0 * fix: await method in example --------- Co-authored-by: Tomas Psota <[email protected]>
1 parent 8f2ccf7 commit 913010f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3786
-3439
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ project.xcworkspace
3535
.project
3636
.settings
3737
local.properties
38-
android.iml
38+
*.iml
3939

4040
# node.js
4141
#

CHANGELOG.md

+41
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,47 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [7.4.0] - 2025-03-05
9+
10+
- iOS SDK version: 6.8.0
11+
- Android SDK version: 14.0.1
12+
13+
### Cordova
14+
15+
#### Added
16+
17+
- Introduced `blockScreenCapture(boolean enable)` method to block/unblock screen capture.
18+
- Introduced `isScreenCaptureBlocked()` method to get the current screen capture blocking status.
19+
- New callbacks:
20+
- `screenshot`: Detects when a screenshot is taken
21+
- `screenRecording`: Detects when screen recording is active
22+
23+
#### Changed
24+
25+
- Set following required SDK versions for Android plugin:
26+
- targetSdkVersion to 35
27+
- compileSdkVersion to 35
28+
29+
### Android
30+
31+
#### Added
32+
33+
- Passive and active screenshot/screen recording protection
34+
35+
#### Changed
36+
37+
- Improved root detection
38+
39+
#### Fixed
40+
41+
- Proguard rules to address warnings from okhttp dependency
42+
43+
### iOS
44+
45+
### Added
46+
47+
- Passive Screenshot/Screen Recording protection
48+
849
## [7.3.0] - 2024-12-29
950

1051
- iOS SDK version: 6.6.3

example/angular.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@
155155
}
156156
},
157157
"cli": {
158-
"schematicCollections": ["@ionic/angular-toolkit"]
158+
"schematicCollections": ["@ionic/angular-toolkit"],
159+
"analytics": false
159160
},
160161
"schematics": {
161162
"@ionic/angular-toolkit:component": {

example/config.xml

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2+
<widget id="io.ionic.starter" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
33
<name>example</name>
44
<description>An awesome Ionic/Cordova app.</description>
55
<author email="[email protected]" href="http://talsec.app/">Talsec Team</author>
@@ -15,13 +15,17 @@
1515
<preference name="SplashScreen" value="screen" />
1616
<preference name="SplashScreenDelay" value="3000" />
1717
<platform name="android">
18-
<preference name="android-targetSdkVersion" value="34" />
19-
<preference name="android-compileSdkVersion" value="34" />
18+
<preference name="android-targetSdkVersion" value="35" />
19+
<preference name="android-compileSdkVersion" value="35" />
2020
<hook src="scripts/modifyGradle.js" type="after_prepare" />
2121
<preference name="Scheme" value="http" />
22-
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
22+
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
2323
<application android:networkSecurityConfig="@xml/network_security_config" />
2424
</edit-config>
25+
<config-file parent="/*" target="AndroidManifest.xml">
26+
<uses-permission android:name="android.permission.DETECT_SCREEN_CAPTURE" />
27+
<uses-permission android:name="android.permission.DETECT_SCREEN_RECORDING" />
28+
</config-file>
2529
<resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
2630
<allow-intent href="market:*" />
2731
<icon src="resources/android/icon/drawable-hdpi-icon.png" />

0 commit comments

Comments
 (0)