react-native-frame-capture 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/FrameCapture.podspec +21 -21
  2. package/LICENSE +20 -20
  3. package/README.md +159 -158
  4. package/android/build.gradle +77 -77
  5. package/android/gradle.properties +5 -5
  6. package/android/src/main/AndroidManifest.xml +20 -20
  7. package/android/src/main/java/com/framecapture/CaptureManager.kt +1013 -831
  8. package/android/src/main/java/com/framecapture/Constants.kt +205 -196
  9. package/android/src/main/java/com/framecapture/ErrorHandler.kt +165 -165
  10. package/android/src/main/java/com/framecapture/FrameCaptureModule.kt +653 -653
  11. package/android/src/main/java/com/framecapture/OverlayRenderer.kt +423 -423
  12. package/android/src/main/java/com/framecapture/PermissionHandler.kt +150 -150
  13. package/android/src/main/java/com/framecapture/ScreenCaptureService.kt +366 -366
  14. package/android/src/main/java/com/framecapture/StorageManager.kt +221 -221
  15. package/android/src/main/java/com/framecapture/capture/BitmapProcessor.kt +157 -157
  16. package/android/src/main/java/com/framecapture/capture/CaptureEventEmitter.kt +150 -120
  17. package/android/src/main/java/com/framecapture/capture/ChangeDetector.kt +191 -0
  18. package/android/src/main/java/com/framecapture/models/CaptureModels.kt +343 -302
  19. package/android/src/main/java/com/framecapture/models/EnumsAndExtensions.kt +67 -60
  20. package/android/src/main/java/com/framecapture/models/OverlayModels.kt +154 -154
  21. package/android/src/main/java/com/framecapture/service/CaptureNotificationManager.kt +286 -286
  22. package/android/src/main/java/com/framecapture/storage/StorageStrategies.kt +317 -317
  23. package/android/src/main/java/com/framecapture/utils/ValidationUtils.kt +379 -379
  24. package/ios/FrameCapture.h +5 -5
  25. package/ios/FrameCapture.mm +21 -21
  26. package/lib/module/NativeFrameCapture.js.map +1 -1
  27. package/lib/module/constants.js +45 -0
  28. package/lib/module/constants.js.map +1 -1
  29. package/lib/module/normalize.js +10 -1
  30. package/lib/module/normalize.js.map +1 -1
  31. package/lib/module/types.js +9 -0
  32. package/lib/module/types.js.map +1 -1
  33. package/lib/module/validation.js +86 -9
  34. package/lib/module/validation.js.map +1 -1
  35. package/lib/typescript/src/NativeFrameCapture.d.ts +7 -0
  36. package/lib/typescript/src/NativeFrameCapture.d.ts.map +1 -1
  37. package/lib/typescript/src/constants.d.ts +33 -0
  38. package/lib/typescript/src/constants.d.ts.map +1 -1
  39. package/lib/typescript/src/normalize.d.ts +8 -2
  40. package/lib/typescript/src/normalize.d.ts.map +1 -1
  41. package/lib/typescript/src/types.d.ts +29 -5
  42. package/lib/typescript/src/types.d.ts.map +1 -1
  43. package/lib/typescript/src/validation.d.ts.map +1 -1
  44. package/package.json +199 -196
  45. package/src/NativeFrameCapture.ts +8 -0
  46. package/src/constants.ts +45 -0
  47. package/src/normalize.ts +23 -3
  48. package/src/types.ts +30 -2
  49. package/src/validation.ts +132 -13
  50. package/plugin/build/index.js +0 -48
@@ -1,21 +1,21 @@
1
- require "json"
2
-
3
- package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
-
5
- Pod::Spec.new do |s|
6
- s.name = "FrameCapture"
7
- s.version = package["version"]
8
- s.summary = package["description"]
9
- s.homepage = package["homepage"]
10
- s.license = package["license"]
11
- s.authors = package["author"]
12
-
13
- s.platforms = { :ios => min_ios_version_supported }
14
- s.source = { :git => "https://github.com/nasyx-rakeeb/react-native-frame-capture.git", :tag => "#{s.version}" }
15
-
16
- s.source_files = "ios/**/*.{h,m,mm,cpp}"
17
- s.private_header_files = "ios/**/*.h"
18
-
19
-
20
- install_modules_dependencies(s)
21
- end
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "FrameCapture"
7
+ s.version = package["version"]
8
+ s.summary = package["description"]
9
+ s.homepage = package["homepage"]
10
+ s.license = package["license"]
11
+ s.authors = package["author"]
12
+
13
+ s.platforms = { :ios => min_ios_version_supported }
14
+ s.source = { :git => "https://github.com/nasyx-rakeeb/react-native-frame-capture.git", :tag => "#{s.version}" }
15
+
16
+ s.source_files = "ios/**/*.{h,m,mm,cpp}"
17
+ s.private_header_files = "ios/**/*.h"
18
+
19
+
20
+ install_modules_dependencies(s)
21
+ end
package/LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Nasyx Rakeeb
4
- Permission is hereby granted, free of charge, to any person obtaining a copy
5
- of this software and associated documentation files (the "Software"), to deal
6
- in the Software without restriction, including without limitation the rights
7
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the Software is
9
- furnished to do so, subject to the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be included in all
12
- copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Nasyx Rakeeb
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/README.md CHANGED
@@ -1,158 +1,159 @@
1
- # React Native Frame Capture
2
-
3
- [![npm version](https://img.shields.io/npm/v/react-native-frame-capture.svg)](https://www.npmjs.com/package/react-native-frame-capture)
4
- [![npm downloads](https://img.shields.io/npm/dm/react-native-frame-capture.svg)](https://www.npmjs.com/package/react-native-frame-capture)
5
- [![license](https://img.shields.io/npm/l/react-native-frame-capture.svg)](https://github.com/nasyx-rakeeb/react-native-frame-capture/blob/main/LICENSE)
6
- [![platform](https://img.shields.io/badge/platform-Android-green.svg)](https://www.android.com/)
7
-
8
- Reliable screen capture for React Native Android. Capture frames at intervals with customizable overlays and storage options.
9
-
10
- ## Features
11
-
12
- - 📸 **Interval-based capture** - Capture frames at configurable intervals (100ms - 60s)
13
- - 🎨 **Customizable overlays** - Add text and image overlays with template variables
14
- - 💾 **Flexible storage** - Save to app-specific, public, or custom directories
15
- - 🔄 **Background capture** - Continues capturing when app is minimized (foreground service)
16
- - **High performance** - Built with Kotlin and TurboModule architecture
17
- - 🎯 **Precise control** - Pause, resume, and stop capture on demand
18
- - 📊 **Real-time events** - Get notified for every captured frame
19
- - 🔧 **Highly configurable** - Image quality, format, resolution scaling, and more
20
- - 📱 **Expo compatible** - Works with Expo through config plugin
21
- - 🎭 **Custom regions** - Capture specific screen areas
22
- - 🚫 **Status bar exclusion** - Optionally exclude status bar from captures
23
-
24
- ## How It Works
25
-
26
- React Native Frame Capture uses Android's **MediaProjection API** to capture screen content at regular intervals. Here's the flow:
27
-
28
- 1. **Request Permission** - User grants screen capture permission via system dialog
29
- 2. **Start Foreground Service** - Ensures capture continues in background
30
- 3. **Create Virtual Display** - Mirrors screen content to an ImageReader
31
- 4. **Capture Frames** - Grabs frames at your specified interval (e.g., every 1 second)
32
- 5. **Process & Save** - Converts to bitmap, applies overlays, saves to storage
33
- 6. **Emit Events** - Notifies your app with frame info (path, size, timestamp)
34
-
35
- **Key Components:**
36
-
37
- - **MediaProjection** - Android API for screen capture (no root required)
38
- - **Foreground Service** - Keeps capture running when app is minimized
39
- - **ImageReader** - Efficiently captures screen pixels
40
- - **TurboModule** - Fast native-to-JS communication
41
-
42
- **Why Foreground Service?** Android kills background processes aggressively. The foreground service (with notification) ensures reliable capture even when your app isn't visible.
43
-
44
- ## Requirements
45
-
46
- - React Native >= 0.74
47
- - Android minSdkVersion >= 21 (Android 5.0)
48
- - Android compileSdkVersion >= 34
49
-
50
- ## Installation
51
-
52
- ```bash
53
- npm install react-native-frame-capture
54
- ```
55
-
56
- or
57
-
58
- ```bash
59
- yarn add react-native-frame-capture
60
- ```
61
-
62
- ### Expo
63
-
64
- Add the config plugin to your `app.json` or `app.config.js`:
65
-
66
- ```json
67
- {
68
- "expo": {
69
- "plugins": ["react-native-frame-capture"]
70
- }
71
- }
72
- ```
73
-
74
- Then rebuild your app:
75
-
76
- ```bash
77
- npx expo prebuild
78
- npx expo run:android
79
- ```
80
-
81
- ## Quick Start
82
-
83
- ```typescript
84
- import * as FrameCapture from 'react-native-frame-capture';
85
- import { Platform, PermissionsAndroid } from 'react-native';
86
-
87
- // 1. Request notification permission (Android 13+)
88
- if (Platform.OS === 'android' && Platform.Version >= 33) {
89
- await PermissionsAndroid.request(
90
- PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS
91
- );
92
- }
93
-
94
- // 2. Request screen capture permission
95
- const permissionStatus = await FrameCapture.requestPermission();
96
-
97
- if (permissionStatus === FrameCapture.PermissionStatus.GRANTED) {
98
- // 3. Start capturing
99
- await FrameCapture.startCapture({
100
- capture: {
101
- interval: 1000, // Capture every second
102
- },
103
- image: {
104
- quality: 80,
105
- format: 'jpeg',
106
- },
107
- storage: {
108
- saveFrames: true,
109
- location: 'private',
110
- },
111
- });
112
-
113
- // 4. Listen for captured frames
114
- const subscription = FrameCapture.addListener(
115
- FrameCapture.CaptureEventType.FRAME_CAPTURED,
116
- (event) => {
117
- console.log('Frame captured:', event.filePath);
118
- }
119
- );
120
-
121
- // 5. Stop capturing when done
122
- await FrameCapture.stopCapture();
123
- subscription.remove();
124
- }
125
- ```
126
-
127
- ## Documentation
128
-
129
- - **[API Reference](docs/api-reference.md)** - Complete API documentation
130
- - **[Configuration](docs/configuration.md)** - Configuration options and interfaces
131
- - **[Events](docs/events.md)** - Event types and handling
132
- - **[Usage Examples](docs/usage-examples.md)** - Practical examples for common use cases
133
- - **[Storage](docs/storage.md)** - Storage behavior and options
134
- - **[Permissions](docs/permissions.md)** - Permission requirements and setup
135
-
136
- ## Platform Support
137
-
138
- | Platform | Supported | Version |
139
- | -------- | --------- | ------- |
140
- | Android | Yes | 5.0+ |
141
- | iOS | No | N/A |
142
-
143
- ## Architecture
144
-
145
- - **TurboModule:** New Architecture compatible
146
- - **Foreground Service:** Reliable background capture
147
- - **Kotlin:** Native Android implementation
148
- - **TypeScript:** Type-safe JavaScript API
149
-
150
- ## Contributing
151
-
152
- See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
153
-
154
- ## License
155
-
156
- MIT © [Nasyx Rakeeb](https://github.com/nasyx-rakeeb)
157
-
158
- Made with ❤️ using [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
1
+ # React Native Frame Capture
2
+
3
+ [![npm version](https://img.shields.io/npm/v/react-native-frame-capture.svg)](https://www.npmjs.com/package/react-native-frame-capture)
4
+ [![npm downloads](https://img.shields.io/npm/dm/react-native-frame-capture.svg)](https://www.npmjs.com/package/react-native-frame-capture)
5
+ [![license](https://img.shields.io/npm/l/react-native-frame-capture.svg)](https://github.com/nasyx-rakeeb/react-native-frame-capture/blob/main/LICENSE)
6
+ [![platform](https://img.shields.io/badge/platform-Android-green.svg)](https://www.android.com/)
7
+
8
+ Reliable screen capture for React Native Android. Capture frames at intervals or when screen content changes, with customizable overlays and storage options.
9
+
10
+ ## Features
11
+
12
+ - 📸 **Interval-based capture** - Capture frames at configurable intervals (100ms - 60s)
13
+ - 🔍 **Change detection mode** - Capture only when screen content changes (NEW!)
14
+ - 🎨 **Customizable overlays** - Add text and image overlays with template variables
15
+ - 💾 **Flexible storage** - Save to app-specific, public, or custom directories
16
+ - 🔄 **Background capture** - Continues capturing when app is minimized (foreground service)
17
+ - **High performance** - Built with Kotlin and TurboModule architecture
18
+ - 🎯 **Precise control** - Pause, resume, and stop capture on demand
19
+ - 📊 **Real-time events** - Get notified for every captured frame
20
+ - 🔧 **Highly configurable** - Image quality, format, resolution scaling, and more
21
+ - 📱 **Expo compatible** - Works with Expo through config plugin
22
+ - 🎭 **Custom regions** - Capture specific screen areas
23
+ - 🚫 **Status bar exclusion** - Optionally exclude status bar from captures
24
+
25
+ ## How It Works
26
+
27
+ React Native Frame Capture uses Android's **MediaProjection API** to capture screen content at regular intervals. Here's the flow:
28
+
29
+ 1. **Request Permission** - User grants screen capture permission via system dialog
30
+ 2. **Start Foreground Service** - Ensures capture continues in background
31
+ 3. **Create Virtual Display** - Mirrors screen content to an ImageReader
32
+ 4. **Capture Frames** - Grabs frames at your specified interval (e.g., every 1 second)
33
+ 5. **Process & Save** - Converts to bitmap, applies overlays, saves to storage
34
+ 6. **Emit Events** - Notifies your app with frame info (path, size, timestamp)
35
+
36
+ **Key Components:**
37
+
38
+ - **MediaProjection** - Android API for screen capture (no root required)
39
+ - **Foreground Service** - Keeps capture running when app is minimized
40
+ - **ImageReader** - Efficiently captures screen pixels
41
+ - **TurboModule** - Fast native-to-JS communication
42
+
43
+ **Why Foreground Service?** Android kills background processes aggressively. The foreground service (with notification) ensures reliable capture even when your app isn't visible.
44
+
45
+ ## Requirements
46
+
47
+ - React Native >= 0.74
48
+ - Android minSdkVersion >= 21 (Android 5.0)
49
+ - Android compileSdkVersion >= 34
50
+
51
+ ## Installation
52
+
53
+ ```bash
54
+ npm install react-native-frame-capture
55
+ ```
56
+
57
+ or
58
+
59
+ ```bash
60
+ yarn add react-native-frame-capture
61
+ ```
62
+
63
+ ### Expo
64
+
65
+ Add the config plugin to your `app.json` or `app.config.js`:
66
+
67
+ ```json
68
+ {
69
+ "expo": {
70
+ "plugins": ["react-native-frame-capture"]
71
+ }
72
+ }
73
+ ```
74
+
75
+ Then rebuild your app:
76
+
77
+ ```bash
78
+ npx expo prebuild
79
+ npx expo run:android
80
+ ```
81
+
82
+ ## Quick Start
83
+
84
+ ```typescript
85
+ import * as FrameCapture from 'react-native-frame-capture';
86
+ import { Platform, PermissionsAndroid } from 'react-native';
87
+
88
+ // 1. Request notification permission (Android 13+)
89
+ if (Platform.OS === 'android' && Platform.Version >= 33) {
90
+ await PermissionsAndroid.request(
91
+ PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS
92
+ );
93
+ }
94
+
95
+ // 2. Request screen capture permission
96
+ const permissionStatus = await FrameCapture.requestPermission();
97
+
98
+ if (permissionStatus === FrameCapture.PermissionStatus.GRANTED) {
99
+ // 3. Start capturing
100
+ await FrameCapture.startCapture({
101
+ capture: {
102
+ interval: 1000, // Capture every second
103
+ },
104
+ image: {
105
+ quality: 80,
106
+ format: 'jpeg',
107
+ },
108
+ storage: {
109
+ saveFrames: true,
110
+ location: 'private',
111
+ },
112
+ });
113
+
114
+ // 4. Listen for captured frames
115
+ const subscription = FrameCapture.addListener(
116
+ FrameCapture.CaptureEventType.FRAME_CAPTURED,
117
+ (event) => {
118
+ console.log('Frame captured:', event.filePath);
119
+ }
120
+ );
121
+
122
+ // 5. Stop capturing when done
123
+ await FrameCapture.stopCapture();
124
+ subscription.remove();
125
+ }
126
+ ```
127
+
128
+ ## Documentation
129
+
130
+ - **[API Reference](docs/api-reference.md)** - Complete API documentation
131
+ - **[Configuration](docs/configuration.md)** - Configuration options and interfaces
132
+ - **[Events](docs/events.md)** - Event types and handling
133
+ - **[Usage Examples](docs/usage-examples.md)** - Practical examples for common use cases
134
+ - **[Storage](docs/storage.md)** - Storage behavior and options
135
+ - **[Permissions](docs/permissions.md)** - Permission requirements and setup
136
+
137
+ ## Platform Support
138
+
139
+ | Platform | Supported | Version |
140
+ | -------- | --------- | ------- |
141
+ | Android | Yes | 5.0+ |
142
+ | iOS | ❌ No | N/A |
143
+
144
+ ## Architecture
145
+
146
+ - **TurboModule:** New Architecture compatible
147
+ - **Foreground Service:** Reliable background capture
148
+ - **Kotlin:** Native Android implementation
149
+ - **TypeScript:** Type-safe JavaScript API
150
+
151
+ ## Contributing
152
+
153
+ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
154
+
155
+ ## License
156
+
157
+ MIT © [Nasyx Rakeeb](https://github.com/nasyx-rakeeb)
158
+
159
+ Made with ❤️ using [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
@@ -1,77 +1,77 @@
1
- buildscript {
2
- ext.getExtOrDefault = {name ->
3
- return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['FrameCapture_' + name]
4
- }
5
-
6
- repositories {
7
- google()
8
- mavenCentral()
9
- }
10
-
11
- dependencies {
12
- classpath "com.android.tools.build:gradle:8.7.2"
13
- // noinspection DifferentKotlinGradleVersion
14
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
15
- }
16
- }
17
-
18
-
19
- apply plugin: "com.android.library"
20
- apply plugin: "kotlin-android"
21
-
22
- apply plugin: "com.facebook.react"
23
-
24
- def getExtOrIntegerDefault(name) {
25
- return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["FrameCapture_" + name]).toInteger()
26
- }
27
-
28
- android {
29
- namespace "com.framecapture"
30
-
31
- compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
32
-
33
- defaultConfig {
34
- minSdkVersion getExtOrIntegerDefault("minSdkVersion")
35
- targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
36
- }
37
-
38
- buildFeatures {
39
- buildConfig true
40
- }
41
-
42
- buildTypes {
43
- release {
44
- minifyEnabled false
45
- }
46
- }
47
-
48
- lintOptions {
49
- disable "GradleCompatible"
50
- }
51
-
52
- compileOptions {
53
- sourceCompatibility JavaVersion.VERSION_1_8
54
- targetCompatibility JavaVersion.VERSION_1_8
55
- }
56
-
57
- sourceSets {
58
- main {
59
- java.srcDirs += [
60
- "generated/java",
61
- "generated/jni"
62
- ]
63
- }
64
- }
65
- }
66
-
67
- repositories {
68
- mavenCentral()
69
- google()
70
- }
71
-
72
- def kotlin_version = getExtOrDefault("kotlinVersion")
73
-
74
- dependencies {
75
- implementation "com.facebook.react:react-android"
76
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
77
- }
1
+ buildscript {
2
+ ext.getExtOrDefault = {name ->
3
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['FrameCapture_' + name]
4
+ }
5
+
6
+ repositories {
7
+ google()
8
+ mavenCentral()
9
+ }
10
+
11
+ dependencies {
12
+ classpath "com.android.tools.build:gradle:8.7.2"
13
+ // noinspection DifferentKotlinGradleVersion
14
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
15
+ }
16
+ }
17
+
18
+
19
+ apply plugin: "com.android.library"
20
+ apply plugin: "kotlin-android"
21
+
22
+ apply plugin: "com.facebook.react"
23
+
24
+ def getExtOrIntegerDefault(name) {
25
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["FrameCapture_" + name]).toInteger()
26
+ }
27
+
28
+ android {
29
+ namespace "com.framecapture"
30
+
31
+ compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
32
+
33
+ defaultConfig {
34
+ minSdkVersion getExtOrIntegerDefault("minSdkVersion")
35
+ targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
36
+ }
37
+
38
+ buildFeatures {
39
+ buildConfig true
40
+ }
41
+
42
+ buildTypes {
43
+ release {
44
+ minifyEnabled false
45
+ }
46
+ }
47
+
48
+ lintOptions {
49
+ disable "GradleCompatible"
50
+ }
51
+
52
+ compileOptions {
53
+ sourceCompatibility JavaVersion.VERSION_1_8
54
+ targetCompatibility JavaVersion.VERSION_1_8
55
+ }
56
+
57
+ sourceSets {
58
+ main {
59
+ java.srcDirs += [
60
+ "generated/java",
61
+ "generated/jni"
62
+ ]
63
+ }
64
+ }
65
+ }
66
+
67
+ repositories {
68
+ mavenCentral()
69
+ google()
70
+ }
71
+
72
+ def kotlin_version = getExtOrDefault("kotlinVersion")
73
+
74
+ dependencies {
75
+ implementation "com.facebook.react:react-android"
76
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
77
+ }
@@ -1,5 +1,5 @@
1
- FrameCapture_kotlinVersion=2.0.21
2
- FrameCapture_minSdkVersion=24
3
- FrameCapture_targetSdkVersion=34
4
- FrameCapture_compileSdkVersion=35
5
- FrameCapture_ndkVersion=27.1.12297006
1
+ FrameCapture_kotlinVersion=2.0.21
2
+ FrameCapture_minSdkVersion=24
3
+ FrameCapture_targetSdkVersion=34
4
+ FrameCapture_compileSdkVersion=35
5
+ FrameCapture_ndkVersion=27.1.12297006
@@ -1,20 +1,20 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
- <!-- Foreground service permissions -->
3
- <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
4
- <uses-permission
5
- android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION"
6
- android:minSdkVersion="34" />
7
-
8
- <!-- Notification permission for API 33+ -->
9
- <uses-permission
10
- android:name="android.permission.POST_NOTIFICATIONS"
11
- android:minSdkVersion="33" />
12
-
13
- <application>
14
- <!-- Screen Capture Foreground Service -->
15
- <service
16
- android:name="com.framecapture.ScreenCaptureService"
17
- android:exported="false"
18
- android:foregroundServiceType="mediaProjection" />
19
- </application>
20
- </manifest>
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ <!-- Foreground service permissions -->
3
+ <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
4
+ <uses-permission
5
+ android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION"
6
+ android:minSdkVersion="34" />
7
+
8
+ <!-- Notification permission for API 33+ -->
9
+ <uses-permission
10
+ android:name="android.permission.POST_NOTIFICATIONS"
11
+ android:minSdkVersion="33" />
12
+
13
+ <application>
14
+ <!-- Screen Capture Foreground Service -->
15
+ <service
16
+ android:name="com.framecapture.ScreenCaptureService"
17
+ android:exported="false"
18
+ android:foregroundServiceType="mediaProjection" />
19
+ </application>
20
+ </manifest>