Minor Changes
-
#760
a895274Thanks @officialasishkumar! - iOS now supports thefileNameoption fortmpfilecaptures, like Android: it is the prefix of the file name, followed by a unique suffix and the extension. iOS used to ignorefileName; it now rejects the capture when the name is shorter than 3 characters or contains/, as Android does. -
#742
101a713Thanks @gre! - Add thesizeUnitoption ("dp"or"px") sowidth/heightmean the same thing on every platform. Without it, they stay points/dp on iOS and Windows and pixels on Android and web.
Patch Changes
-
#761
6d52f61Thanks @fabriziocucci! - Android:captureScreennow snapshots the window with PixelCopy (API 26+), so TextureViews such as maps or video keep their z-order with the views drawn above them. WithhandleGLSurfaceViewOnAndroid, or if PixelCopy fails, it falls back to the previous drawing path. -
#746
013fbe9Thanks @gre! - Android: stop using APIs deprecated in React Native 0.88 and Android (TurboReactPackage,getCurrentActivity(),GuardedAsyncTask,CompressFormat.WEBP), removing build warnings. -
#745
352f3b6Thanks @gre! - Android: drop Gradle syntax and attributes deprecated by Gradle 10 and AGP 8 (space-assignment properties, method-stylecompileSdkVersion/minSdkVersion, the manifestpackageattribute, the libraryversionCode/versionName). Thenamespaceis now always set, so AGP 7 or older is no longer supported (React Native 0.80+ already requires AGP 8). -
#737
0b970c9Thanks @gre! - Android: ship explicit consumer ProGuard/R8 rules for the native module, instead of relying only on React Native's own keep rules. -
#738
1b032e7Thanks @gre! - Android: when the app does not define them, the library now defaults tocompileSdkVersion35 (was 34) andminSdkVersion24 (was 21), and no longer sets atargetSdkVersion. React Native 0.80+ templates define these values, so most apps are unaffected. -
#765
6e3cbfaThanks @gre! - ThefileNameoption now replaces characters other than letters, digits,.,_and-with_(with a dev warning), so the resultingtmpfilepath is always safe to turn into afile://URL. -
#771
1da3a46Thanks @saseungmin! - Use type-only imports so React Native consumers withverbatimModuleSyntaxenabled can type-check the library source without TS1484 errors. -
#747
deeaab2Thanks @gre! - iOS:captureScreenuses the foreground scene's key window instead of the deprecatedkeyWindow, keeps working while the app is in the background, and rejects with a clear message when no window is available. -
#774
a4be523Thanks @gre! - Fix TypeScript errors in apps that enableexactOptionalPropertyTypesornoPropertyAccessFromIndexSignature. React Native type-checks this package'ssrc/(through thereact-nativeexport condition) with the app's own compiler options, whereskipLibCheckdoes not apply. -
#742
101a713Thanks @gre! - Windows: readwidth/heightas decimals instead of truncating them, and round half pixels away from zero (like JSMath.round), sosizeUnitproduces the exact requested pixel size. -
#740
1573f78Thanks @gre! - Declare the Windows-onlypathcapture option in the TypeScript types and the README. The Windows module already supported it.