react-native-inapp-inspector 2.5.12 → 2.5.14

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 (392) hide show
  1. package/README.md +0 -8
  2. package/android/.gradle/8.9/checksums/checksums.lock +0 -0
  3. package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
  4. package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
  5. package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
  6. package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
  7. package/android/.gradle/8.9/gc.properties +0 -0
  8. package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
  9. package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
  10. package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
  11. package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
  12. package/android/.gradle/9.2.0/gc.properties +0 -0
  13. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  14. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  15. package/android/.gradle/vcs-1/gc.properties +0 -0
  16. package/android/.settings/org.eclipse.buildship.core.prefs +13 -0
  17. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/results.bin +1 -0
  18. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/BuildConfig.dex +0 -0
  19. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView$iconView$1.dex +0 -0
  20. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/InAppInspectorFloatingView.dex +0 -0
  21. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NativeNetworkInspectorSpec.dex +0 -0
  22. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$Companion.dex +0 -0
  23. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$activityEventListener$1.dex +0 -0
  24. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$frameCallback$1.dex +0 -0
  25. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$62$$inlined$sortedByDescending$1.dex +0 -0
  26. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$shakeListener$1.dex +0 -0
  27. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.dex +0 -0
  28. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorModule.dex +0 -0
  29. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/inappinspector/NetworkInspectorPackage.dex +0 -0
  30. package/android/build/.transforms/ad628164ecef2a7cc593f0fd2f4050ce/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  31. package/android/build/.transforms/c93e459e24d856bde563ebb048265732/results.bin +1 -0
  32. package/android/build/.transforms/c93e459e24d856bde563ebb048265732/transformed/classes/classes_dex/classes.dex +0 -0
  33. package/android/build/generated/source/buildConfig/debug/com/inappinspector/BuildConfig.java +10 -0
  34. package/android/build/generated/source/codegen/java/com/inappinspector/NativeNetworkInspectorSpec.java +176 -0
  35. package/android/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
  36. package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec-generated.cpp +236 -0
  37. package/android/build/generated/source/codegen/jni/RNInAppInspectorSpec.h +31 -0
  38. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.cpp +22 -0
  39. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ComponentDescriptors.h +24 -0
  40. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.cpp +16 -0
  41. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/EventEmitters.h +17 -0
  42. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.cpp +19 -0
  43. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/Props.h +18 -0
  44. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/RNInAppInspectorSpecJSI.h +337 -0
  45. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.cpp +17 -0
  46. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/ShadowNodes.h +23 -0
  47. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.cpp +16 -0
  48. package/android/build/generated/source/codegen/jni/react/renderer/components/RNInAppInspectorSpec/States.h +20 -0
  49. package/android/build/generated/source/codegen/schema.json +1 -0
  50. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +19 -0
  51. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  52. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  53. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  54. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  55. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  56. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +1 -0
  57. package/android/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/xml_inappinspector_file_paths.xml.flat +0 -0
  58. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -0
  59. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  60. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  61. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  62. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  63. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
  64. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/BuildConfig.class +0 -0
  65. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
  66. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +3 -0
  67. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +28 -0
  68. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +19 -0
  69. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  70. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  71. package/android/build/intermediates/packaged_res/debug/packageDebugResources/xml/inappinspector_file_paths.xml +7 -0
  72. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
  73. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/BuildConfig.class +0 -0
  74. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
  75. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
  76. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NativeNetworkInspectorSpec.class +0 -0
  77. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
  78. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$activityEventListener$1.class +0 -0
  79. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
  80. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$62$$inlined$sortedByDescending$1.class +0 -0
  81. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
  82. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.class +0 -0
  83. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorModule.class +0 -0
  84. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/inappinspector/NetworkInspectorPackage.class +0 -0
  85. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  86. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +2 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  147. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  149. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  150. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  151. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  152. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  153. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  154. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  155. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  156. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  157. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  158. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  159. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  160. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  161. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  162. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  163. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  164. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  165. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  166. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  167. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  168. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  169. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  170. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  171. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  172. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  173. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  174. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  175. package/android/build/outputs/logs/manifest-merger-debug-report.txt +35 -0
  176. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  177. package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-inapp-inspector_debug.kotlin_module +0 -0
  178. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView$iconView$1.class +0 -0
  179. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/InAppInspectorFloatingView.class +0 -0
  180. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$Companion.class +0 -0
  181. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$activityEventListener$1.class +0 -0
  182. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$frameCallback$1.class +0 -0
  183. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$getCapturedMedia$lambda$62$$inlined$sortedByDescending$1.class +0 -0
  184. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$shakeListener$1.class +0 -0
  185. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule$startVideoRecording$2$1.class +0 -0
  186. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorModule.class +0 -0
  187. package/android/build/tmp/kotlin-classes/debug/com/inappinspector/NetworkInspectorPackage.class +0 -0
  188. package/android/src/main/AndroidManifest.xml +11 -0
  189. package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +492 -45
  190. package/android/src/main/res/xml/inappinspector_file_paths.xml +7 -0
  191. package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +47 -49
  192. package/dist/commonjs/components/Inspector/BoxModelVisualizer.d.ts +8 -0
  193. package/dist/commonjs/components/Inspector/BoxModelVisualizer.js +76 -0
  194. package/dist/commonjs/components/Inspector/ConsoleExportModal.js +51 -51
  195. package/dist/commonjs/components/Inspector/ConsoleTab.js +7 -7
  196. package/dist/commonjs/components/Inspector/CrashTab.js +17 -17
  197. package/dist/commonjs/components/Inspector/DebuggingTab.js +37 -37
  198. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +2 -2
  199. package/dist/commonjs/components/Inspector/FabLauncher.js +4 -4
  200. package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +2 -2
  201. package/dist/commonjs/components/Inspector/InspectorHeader.js +36 -36
  202. package/dist/commonjs/components/Inspector/MainScreen.js +38 -75
  203. package/dist/commonjs/components/Inspector/MediaGalleryTab.js +10 -10
  204. package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +1 -0
  205. package/dist/commonjs/components/Inspector/MediaPreviewModal.js +222 -222
  206. package/dist/commonjs/components/Inspector/NetworkExportModal.d.ts +10 -0
  207. package/dist/commonjs/components/Inspector/NetworkExportModal.js +333 -0
  208. package/dist/commonjs/components/Inspector/NetworkTab.js +60 -53
  209. package/dist/commonjs/components/Inspector/NpmStarPrompt.js +11 -12
  210. package/dist/commonjs/components/Inspector/ReduxDetail.js +17 -19
  211. package/dist/commonjs/components/Inspector/ReduxTab.js +5 -5
  212. package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
  213. package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +17 -16
  214. package/dist/commonjs/components/Inspector/SettingsPanel.js +43 -47
  215. package/dist/commonjs/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
  216. package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +34 -3
  217. package/dist/commonjs/components/Inspector/SocketCard.js +2 -2
  218. package/dist/commonjs/components/Inspector/SupportPage.js +5 -5
  219. package/dist/commonjs/components/Inspector/TabBar.js +9 -15
  220. package/dist/commonjs/components/Inspector/UiA11yAuditPanel.d.ts +7 -0
  221. package/dist/commonjs/components/Inspector/UiA11yAuditPanel.js +97 -0
  222. package/dist/commonjs/components/Inspector/UiInspectorDetail.d.ts +2 -0
  223. package/dist/commonjs/components/Inspector/UiInspectorDetail.js +485 -0
  224. package/dist/commonjs/components/Inspector/UiInspectorOverlay.d.ts +2 -0
  225. package/dist/commonjs/components/Inspector/UiInspectorOverlay.js +199 -0
  226. package/dist/commonjs/components/Inspector/UiInspectorTab.d.ts +2 -0
  227. package/dist/commonjs/components/Inspector/UiInspectorTab.js +117 -0
  228. package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.d.ts +10 -0
  229. package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.js +148 -0
  230. package/dist/commonjs/components/Inspector/index.d.ts +28 -0
  231. package/dist/commonjs/components/Inspector/index.js +1 -0
  232. package/dist/commonjs/components/LogCard.js +12 -10
  233. package/dist/commonjs/components/SkeletonPlaceholder.d.ts +3 -0
  234. package/dist/commonjs/components/SkeletonPlaceholder.js +34 -3
  235. package/dist/commonjs/constants/index.js +1 -1
  236. package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
  237. package/dist/commonjs/constants/telemetryConfig.js +1 -1
  238. package/dist/commonjs/constants/version.d.ts +1 -1
  239. package/dist/commonjs/constants/version.js +1 -1
  240. package/dist/commonjs/customHooks/crashHandler.d.ts +1 -1
  241. package/dist/commonjs/customHooks/crashHandler.js +6 -6
  242. package/dist/commonjs/customHooks/uiInspectorManager.d.ts +22 -0
  243. package/dist/commonjs/customHooks/uiInspectorManager.js +1 -0
  244. package/dist/commonjs/helpers/index.js +1 -3
  245. package/dist/commonjs/helpers/remoteConfig.js +1 -1
  246. package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -0
  247. package/dist/commonjs/helpers/searchQueryParser.js +7 -5
  248. package/dist/commonjs/helpers/shareFormatter.d.ts +16 -0
  249. package/dist/commonjs/helpers/shareFormatter.js +16 -9
  250. package/dist/commonjs/helpers/uiInspectorEngine.d.ts +62 -0
  251. package/dist/commonjs/helpers/uiInspectorEngine.js +19 -0
  252. package/dist/commonjs/i18n/locales/ar.json +1 -1
  253. package/dist/commonjs/i18n/locales/bn.json +1 -1
  254. package/dist/commonjs/i18n/locales/de.json +1 -1
  255. package/dist/commonjs/i18n/locales/en.json +1 -1
  256. package/dist/commonjs/i18n/locales/es.json +1 -1
  257. package/dist/commonjs/i18n/locales/fr.json +1 -1
  258. package/dist/commonjs/i18n/locales/gu.json +1 -1
  259. package/dist/commonjs/i18n/locales/hi.json +1 -1
  260. package/dist/commonjs/i18n/locales/id.json +1 -1
  261. package/dist/commonjs/i18n/locales/it.json +1 -1
  262. package/dist/commonjs/i18n/locales/ja.json +1 -1
  263. package/dist/commonjs/i18n/locales/kn.json +1 -1
  264. package/dist/commonjs/i18n/locales/ko.json +1 -1
  265. package/dist/commonjs/i18n/locales/ml.json +1 -1
  266. package/dist/commonjs/i18n/locales/mr.json +1 -1
  267. package/dist/commonjs/i18n/locales/nl.json +1 -1
  268. package/dist/commonjs/i18n/locales/pa.json +1 -1
  269. package/dist/commonjs/i18n/locales/pl.json +1 -1
  270. package/dist/commonjs/i18n/locales/pt.json +1 -1
  271. package/dist/commonjs/i18n/locales/ru.json +1 -1
  272. package/dist/commonjs/i18n/locales/ta.json +1 -1
  273. package/dist/commonjs/i18n/locales/te.json +1 -1
  274. package/dist/commonjs/i18n/locales/tr.json +1 -1
  275. package/dist/commonjs/i18n/locales/vi.json +1 -1
  276. package/dist/commonjs/i18n/locales/zh.json +1 -1
  277. package/dist/commonjs/index.d.ts +4 -2
  278. package/dist/commonjs/index.js +3 -3
  279. package/dist/commonjs/native/NativeInspector.d.ts +4 -0
  280. package/dist/commonjs/native/NativeInspector.js +1 -1
  281. package/dist/commonjs/native/NativeNetworkInspector.d.ts +4 -0
  282. package/dist/commonjs/styles/AppFonts.d.ts +4 -0
  283. package/dist/commonjs/styles/AppFonts.js +1 -1
  284. package/dist/commonjs/styles/index.d.ts +2 -0
  285. package/dist/commonjs/styles/index.js +1 -1
  286. package/dist/commonjs/types/editor.d.ts +31 -0
  287. package/dist/commonjs/types/enums.d.ts +0 -2
  288. package/dist/commonjs/types/enums.js +1 -1
  289. package/dist/commonjs/types/interfaces.d.ts +1 -1
  290. package/dist/esm/components/Inspector/AnalyticsFilterModal.js +73 -75
  291. package/dist/esm/components/Inspector/BoxModelVisualizer.d.ts +8 -0
  292. package/dist/esm/components/Inspector/BoxModelVisualizer.js +76 -0
  293. package/dist/esm/components/Inspector/ConsoleExportModal.js +67 -67
  294. package/dist/esm/components/Inspector/ConsoleTab.js +48 -48
  295. package/dist/esm/components/Inspector/CrashTab.js +58 -58
  296. package/dist/esm/components/Inspector/DebuggingTab.js +105 -105
  297. package/dist/esm/components/Inspector/DeviceInfoTab.js +2 -2
  298. package/dist/esm/components/Inspector/FabLauncher.js +50 -50
  299. package/dist/esm/components/Inspector/FloatingCaptureWidget.js +23 -23
  300. package/dist/esm/components/Inspector/InspectorHeader.js +64 -64
  301. package/dist/esm/components/Inspector/MainScreen.js +87 -124
  302. package/dist/esm/components/Inspector/MediaGalleryTab.js +151 -151
  303. package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +1 -0
  304. package/dist/esm/components/Inspector/MediaPreviewModal.js +468 -468
  305. package/dist/esm/components/Inspector/NetworkExportModal.d.ts +10 -0
  306. package/dist/esm/components/Inspector/NetworkExportModal.js +333 -0
  307. package/dist/esm/components/Inspector/NetworkTab.js +143 -136
  308. package/dist/esm/components/Inspector/NpmStarPrompt.js +32 -33
  309. package/dist/esm/components/Inspector/ReduxDetail.js +54 -56
  310. package/dist/esm/components/Inspector/ReduxTab.js +9 -9
  311. package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
  312. package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +23 -22
  313. package/dist/esm/components/Inspector/SettingsPanel.js +109 -113
  314. package/dist/esm/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
  315. package/dist/esm/components/Inspector/SkeletonPlaceholder.js +42 -11
  316. package/dist/esm/components/Inspector/SocketCard.js +13 -13
  317. package/dist/esm/components/Inspector/SupportPage.js +5 -5
  318. package/dist/esm/components/Inspector/TabBar.js +35 -41
  319. package/dist/esm/components/Inspector/UiA11yAuditPanel.d.ts +7 -0
  320. package/dist/esm/components/Inspector/UiA11yAuditPanel.js +97 -0
  321. package/dist/esm/components/Inspector/UiInspectorDetail.d.ts +2 -0
  322. package/dist/esm/components/Inspector/UiInspectorDetail.js +422 -0
  323. package/dist/esm/components/Inspector/UiInspectorOverlay.d.ts +2 -0
  324. package/dist/esm/components/Inspector/UiInspectorOverlay.js +138 -0
  325. package/dist/esm/components/Inspector/UiInspectorTab.d.ts +2 -0
  326. package/dist/esm/components/Inspector/UiInspectorTab.js +117 -0
  327. package/dist/esm/components/Inspector/UiLiveStyleTweaker.d.ts +10 -0
  328. package/dist/esm/components/Inspector/UiLiveStyleTweaker.js +148 -0
  329. package/dist/esm/components/Inspector/index.d.ts +28 -0
  330. package/dist/esm/components/Inspector/index.js +1 -0
  331. package/dist/esm/components/LogCard.js +24 -22
  332. package/dist/esm/components/SkeletonPlaceholder.d.ts +3 -0
  333. package/dist/esm/components/SkeletonPlaceholder.js +42 -11
  334. package/dist/esm/constants/index.js +1 -1
  335. package/dist/esm/constants/telemetryConfig.d.ts +3 -3
  336. package/dist/esm/constants/telemetryConfig.js +1 -1
  337. package/dist/esm/constants/version.d.ts +1 -1
  338. package/dist/esm/constants/version.js +1 -1
  339. package/dist/esm/customHooks/crashHandler.d.ts +1 -1
  340. package/dist/esm/customHooks/crashHandler.js +6 -6
  341. package/dist/esm/customHooks/uiInspectorManager.d.ts +22 -0
  342. package/dist/esm/customHooks/uiInspectorManager.js +1 -0
  343. package/dist/esm/helpers/index.js +4 -6
  344. package/dist/esm/helpers/remoteConfig.js +1 -1
  345. package/dist/esm/helpers/searchQueryParser.d.ts +1 -0
  346. package/dist/esm/helpers/searchQueryParser.js +7 -5
  347. package/dist/esm/helpers/shareFormatter.d.ts +16 -0
  348. package/dist/esm/helpers/shareFormatter.js +20 -13
  349. package/dist/esm/helpers/uiInspectorEngine.d.ts +48 -0
  350. package/dist/esm/helpers/uiInspectorEngine.js +19 -0
  351. package/dist/esm/i18n/locales/ar.json +1 -1
  352. package/dist/esm/i18n/locales/bn.json +1 -1
  353. package/dist/esm/i18n/locales/de.json +1 -1
  354. package/dist/esm/i18n/locales/en.json +1 -1
  355. package/dist/esm/i18n/locales/es.json +1 -1
  356. package/dist/esm/i18n/locales/fr.json +1 -1
  357. package/dist/esm/i18n/locales/gu.json +1 -1
  358. package/dist/esm/i18n/locales/hi.json +1 -1
  359. package/dist/esm/i18n/locales/id.json +1 -1
  360. package/dist/esm/i18n/locales/it.json +1 -1
  361. package/dist/esm/i18n/locales/ja.json +1 -1
  362. package/dist/esm/i18n/locales/kn.json +1 -1
  363. package/dist/esm/i18n/locales/ko.json +1 -1
  364. package/dist/esm/i18n/locales/ml.json +1 -1
  365. package/dist/esm/i18n/locales/mr.json +1 -1
  366. package/dist/esm/i18n/locales/nl.json +1 -1
  367. package/dist/esm/i18n/locales/pa.json +1 -1
  368. package/dist/esm/i18n/locales/pl.json +1 -1
  369. package/dist/esm/i18n/locales/pt.json +1 -1
  370. package/dist/esm/i18n/locales/ru.json +1 -1
  371. package/dist/esm/i18n/locales/ta.json +1 -1
  372. package/dist/esm/i18n/locales/te.json +1 -1
  373. package/dist/esm/i18n/locales/tr.json +1 -1
  374. package/dist/esm/i18n/locales/vi.json +1 -1
  375. package/dist/esm/i18n/locales/zh.json +1 -1
  376. package/dist/esm/index.d.ts +4 -2
  377. package/dist/esm/index.js +8 -8
  378. package/dist/esm/native/NativeInspector.d.ts +4 -0
  379. package/dist/esm/native/NativeInspector.js +1 -1
  380. package/dist/esm/native/NativeNetworkInspector.d.ts +4 -0
  381. package/dist/esm/styles/AppFonts.d.ts +4 -0
  382. package/dist/esm/styles/AppFonts.js +1 -1
  383. package/dist/esm/styles/index.d.ts +2 -0
  384. package/dist/esm/styles/index.js +1 -1
  385. package/dist/esm/types/editor.d.ts +31 -0
  386. package/dist/esm/types/enums.d.ts +0 -2
  387. package/dist/esm/types/enums.js +1 -1
  388. package/dist/esm/types/interfaces.d.ts +1 -1
  389. package/ios/NetworkInspectorModule.mm +597 -336
  390. package/package.json +1 -1
  391. package/src/native/NativeInspector.ts +67 -0
  392. package/src/native/NativeNetworkInspector.ts +4 -0
@@ -197,37 +197,22 @@ class NetworkInspectorModule(private val reactContext: ReactApplicationContext)
197
197
 
198
198
  defaultHandler = Thread.getDefaultUncaughtExceptionHandler()
199
199
 
200
- // 1. Intercept all uncaught exceptions on background/worker threads (prevents OS force-close)
200
+ // 1. Intercept all uncaught exceptions
201
201
  Thread.setDefaultUncaughtExceptionHandler { thread, throwable ->
202
202
  try {
203
203
  handleNativeCrash(thread, throwable)
204
204
  } catch (e: Exception) {
205
205
  Log.e(TAG, "Error in native crash handler", e)
206
206
  }
207
- // Suppress defaultHandler?.uncaughtException() to prevent OS killing the process
208
- }
209
-
210
- // 2. Main Looper Crash Shield: Protects UI thread from dying on uncaught exceptions
211
- try {
212
- android.os.Handler(android.os.Looper.getMainLooper()).post {
213
- while (true) {
214
- try {
215
- android.os.Looper.loop()
216
- } catch (e: Throwable) {
217
- try {
218
- handleNativeCrash(Thread.currentThread(), e)
219
- } catch (ex: Exception) {
220
- Log.e(TAG, "Error in Main Looper crash protection", ex)
221
- }
222
- }
223
- }
207
+ try {
208
+ defaultHandler?.uncaughtException(thread, throwable)
209
+ } catch (e: Exception) {
210
+ Log.e(TAG, "Error delegating to default handler", e)
224
211
  }
225
- } catch (e: Exception) {
226
- Log.w(TAG, "Failed to start Looper crash protection", e)
227
212
  }
228
213
 
229
214
  isProtectionEnabled = true
230
- Log.i(TAG, "Native Android Crash Shield enabled (Process kill prevention active)")
215
+ Log.i(TAG, "Native Android Crash Protection enabled")
231
216
  }
232
217
 
233
218
  private fun handleNativeCrash(thread: Thread, throwable: Throwable) {
@@ -251,6 +236,22 @@ class NetworkInspectorModule(private val reactContext: ReactApplicationContext)
251
236
  .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
252
237
  .emit("onNativeCrash", params)
253
238
  }
239
+
240
+ // Also persist crash to disk synchronously
241
+ try {
242
+ val crashFile = File(getCapturesDirectory(), "last_native_crash.json")
243
+ val json = org.json.JSONObject().apply {
244
+ put("platform", "android")
245
+ put("error", throwable.message ?: "Unknown native exception")
246
+ put("name", throwable.javaClass.name)
247
+ put("stack", stackTrace)
248
+ put("threadName", thread.name)
249
+ put("timestamp", System.currentTimeMillis())
250
+ }
251
+ FileOutputStream(crashFile).use { fos ->
252
+ fos.write(json.toString(2).toByteArray(Charsets.UTF_8))
253
+ }
254
+ } catch (e: Exception) {}
254
255
  } catch (e: Exception) {
255
256
  Log.e(TAG, "Failed to emit onNativeCrash to JS", e)
256
257
  }
@@ -266,6 +267,43 @@ class NetworkInspectorModule(private val reactContext: ReactApplicationContext)
266
267
  }
267
268
  }
268
269
 
270
+ @ReactMethod
271
+ fun getLastNativeCrash(promise: Promise) {
272
+ try {
273
+ val crashFile = File(getCapturesDirectory(), "last_native_crash.json")
274
+ if (crashFile.exists()) {
275
+ val jsonStr = crashFile.readText(Charsets.UTF_8)
276
+ val jsonObj = org.json.JSONObject(jsonStr)
277
+ val map = Arguments.createMap().apply {
278
+ putString("platform", jsonObj.optString("platform", "android"))
279
+ putString("error", jsonObj.optString("error", ""))
280
+ putString("name", jsonObj.optString("name", ""))
281
+ putString("stack", jsonObj.optString("stack", ""))
282
+ putString("threadName", jsonObj.optString("threadName", ""))
283
+ putDouble("timestamp", jsonObj.optDouble("timestamp", 0.0))
284
+ }
285
+ promise.resolve(map)
286
+ } else {
287
+ promise.resolve(null)
288
+ }
289
+ } catch (e: Exception) {
290
+ promise.reject("GET_CRASH_ERROR", e.message, e)
291
+ }
292
+ }
293
+
294
+ @ReactMethod
295
+ fun clearLastNativeCrash(promise: Promise) {
296
+ try {
297
+ val crashFile = File(getCapturesDirectory(), "last_native_crash.json")
298
+ if (crashFile.exists()) {
299
+ crashFile.delete()
300
+ }
301
+ promise.resolve(true)
302
+ } catch (e: Exception) {
303
+ promise.reject("CLEAR_CRASH_ERROR", e.message, e)
304
+ }
305
+ }
306
+
269
307
  @ReactMethod
270
308
  fun getDeviceMetrics(promise: Promise) {
271
309
  try {
@@ -398,7 +436,10 @@ class NetworkInspectorModule(private val reactContext: ReactApplicationContext)
398
436
  val sizeDp = if (options != null && options.hasKey("size")) options.getDouble("size").toFloat() else 64f
399
437
  val sizePx = (sizeDp * density).toInt()
400
438
 
401
- if (floatingButton == null) {
439
+ if (floatingButton == null || floatingButton?.context != activity) {
440
+ floatingButton?.let { oldBtn ->
441
+ (oldBtn.parent as? android.view.ViewGroup)?.removeView(oldBtn)
442
+ }
402
443
  floatingButton = InAppInspectorFloatingView(activity) {
403
444
  emitFloatingButtonPress()
404
445
  }
@@ -417,7 +458,12 @@ class NetworkInspectorModule(private val reactContext: ReactApplicationContext)
417
458
  floatingButton?.y = initialY
418
459
  decorView.addView(floatingButton, params)
419
460
  } else {
420
- if (floatingButton?.parent == null) {
461
+ val currentParent = floatingButton?.parent as? android.view.ViewGroup
462
+ if (currentParent == null) {
463
+ val params = android.widget.FrameLayout.LayoutParams(sizePx, sizePx)
464
+ decorView.addView(floatingButton, params)
465
+ } else if (currentParent != decorView) {
466
+ currentParent.removeView(floatingButton)
421
467
  val params = android.widget.FrameLayout.LayoutParams(sizePx, sizePx)
422
468
  decorView.addView(floatingButton, params)
423
469
  } else {
@@ -839,7 +885,25 @@ class NetworkInspectorModule(private val reactContext: ReactApplicationContext)
839
885
  }
840
886
 
841
887
  private fun getActiveWindow(): Window? {
842
- return reactContext.currentActivity?.window
888
+ val activity = reactContext.currentActivity
889
+ if (activity == null || activity.isFinishing || (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && activity.isDestroyed)) {
890
+ return null
891
+ }
892
+ return activity.window
893
+ }
894
+
895
+ private fun getOrCreateCaptureHandler(): Handler {
896
+ synchronized(this) {
897
+ val handler = captureBackgroundHandler
898
+ if (handler != null && captureHandlerThread?.isAlive == true) {
899
+ return handler
900
+ }
901
+ val thread = HandlerThread("InAppInspector-PixelCopy").apply { start() }
902
+ captureHandlerThread = thread
903
+ val newHandler = Handler(thread.looper)
904
+ captureBackgroundHandler = newHandler
905
+ return newHandler
906
+ }
843
907
  }
844
908
 
845
909
  private fun captureWindowBitmap(window: Window?, scale: Float, callback: (Bitmap?) -> Unit) {
@@ -861,9 +925,12 @@ class NetworkInspectorModule(private val reactContext: ReactApplicationContext)
861
925
 
862
926
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
863
927
  val destBitmap = Bitmap.createBitmap(targetWidth, targetHeight, Bitmap.Config.ARGB_8888)
864
- val copyHandler = captureBackgroundHandler ?: mainHandler
928
+ val copyHandler = getOrCreateCaptureHandler()
865
929
  try {
866
- PixelCopy.request(targetWindow, null, destBitmap, { copyResult ->
930
+ val srcRect = if (decorView.width > 0 && decorView.height > 0) {
931
+ android.graphics.Rect(0, 0, decorView.width, decorView.height)
932
+ } else null
933
+ PixelCopy.request(targetWindow, srcRect, destBitmap, { copyResult ->
867
934
  if (copyResult == PixelCopy.SUCCESS) {
868
935
  callback(destBitmap)
869
936
  } else {
@@ -1407,6 +1474,24 @@ class NetworkInspectorModule(private val reactContext: ReactApplicationContext)
1407
1474
  // 100% Native Media Editor: Photo Editing (Bitmap + ColorMatrix + Canvas)
1408
1475
  // ─────────────────────────────────────────────────────────────────────────
1409
1476
 
1477
+ private fun parseInspectorHexColor(hex: String?, defaultColor: Int = android.graphics.Color.RED): Int {
1478
+ if (hex.isNullOrBlank()) return defaultColor
1479
+ val clean = hex.trim()
1480
+ return try {
1481
+ if (clean.startsWith("#") && clean.length == 9) {
1482
+ val r = clean.substring(1, 3)
1483
+ val g = clean.substring(3, 5)
1484
+ val b = clean.substring(5, 7)
1485
+ val a = clean.substring(7, 9)
1486
+ android.graphics.Color.parseColor("#$a$r$g$b")
1487
+ } else {
1488
+ android.graphics.Color.parseColor(clean)
1489
+ }
1490
+ } catch (_: Exception) {
1491
+ defaultColor
1492
+ }
1493
+ }
1494
+
1410
1495
  @ReactMethod
1411
1496
  fun editPhoto(options: ReadableMap, promise: Promise) {
1412
1497
  captureExecutor.execute {
@@ -1599,54 +1684,302 @@ class NetworkInspectorModule(private val reactContext: ReactApplicationContext)
1599
1684
  finalBitmap = croppedBitmap
1600
1685
  }
1601
1686
 
1602
- // 5. Apply Redactions & Annotations Overlay if provided
1687
+ // 5. Apply Redactions, Freehand Drawings, Draggable Texts & Annotations Overlay if provided
1603
1688
  val mutableBitmap = if (finalBitmap.isMutable) finalBitmap else finalBitmap.copy(Bitmap.Config.ARGB_8888, true)
1604
1689
  val canvas = android.graphics.Canvas(mutableBitmap)
1605
- val overlayPaint = android.graphics.Paint(android.graphics.Paint.ANTI_ALIAS_FLAG)
1690
+ val canvasW = mutableBitmap.width.toFloat()
1691
+ val canvasH = mutableBitmap.height.toFloat()
1692
+ val baseScale = Math.max(1.0f, canvasW / 380.0f)
1606
1693
 
1694
+ // A. Redactions (Blackout or Blur/Pixelate Box)
1607
1695
  if (options.hasKey("redactions")) {
1608
1696
  val redactions = options.getArray("redactions")
1609
1697
  if (redactions != null) {
1610
- overlayPaint.color = android.graphics.Color.BLACK
1611
- overlayPaint.style = android.graphics.Paint.Style.FILL
1698
+ val redactPaint = android.graphics.Paint(android.graphics.Paint.ANTI_ALIAS_FLAG).apply {
1699
+ style = android.graphics.Paint.Style.FILL
1700
+ }
1612
1701
  for (i in 0 until redactions.size()) {
1613
1702
  val box = redactions.getMap(i) ?: continue
1614
1703
  var x = if (box.hasKey("x")) box.getDouble("x").toFloat() else 0f
1615
1704
  var y = if (box.hasKey("y")) box.getDouble("y").toFloat() else 0f
1616
1705
  var w = if (box.hasKey("width")) box.getDouble("width").toFloat() else 0f
1617
1706
  var h = if (box.hasKey("height")) box.getDouble("height").toFloat() else 0f
1618
- val isNorm = if (box.hasKey("isNormalized")) box.getBoolean("isNormalized") else false
1707
+ val isNorm = if (box.hasKey("isNormalized")) box.getBoolean("isNormalized") else true
1619
1708
  if (isNorm) {
1620
- x *= mutableBitmap.width
1621
- y *= mutableBitmap.height
1622
- w *= mutableBitmap.width
1623
- h *= mutableBitmap.height
1709
+ x *= canvasW
1710
+ y *= canvasH
1711
+ w *= canvasW
1712
+ h *= canvasH
1624
1713
  }
1625
- canvas.drawRect(x, y, x + w, y + h, overlayPaint)
1714
+ val style = if (box.hasKey("style")) box.getString("style") else "blackout"
1715
+ if (style == "blur" || style == "pixelate") {
1716
+ redactPaint.color = android.graphics.Color.argb(235, 30, 30, 30)
1717
+ } else {
1718
+ redactPaint.color = android.graphics.Color.BLACK
1719
+ }
1720
+ canvas.drawRect(x, y, x + w, y + h, redactPaint)
1626
1721
  }
1627
1722
  }
1628
1723
  }
1629
1724
 
1630
- if (options.hasKey("annotations")) {
1725
+ // B. Freehand Drawings & Vector Shapes (Brush, Highlighter, Arrow, Rect, Circle, Step)
1726
+ if (options.hasKey("drawings")) {
1727
+ val drawings = options.getArray("drawings")
1728
+ if (drawings != null) {
1729
+ val strokePaint = android.graphics.Paint(android.graphics.Paint.ANTI_ALIAS_FLAG)
1730
+
1731
+ for (i in 0 until drawings.size()) {
1732
+ val stroke = drawings.getMap(i) ?: continue
1733
+ val type = if (stroke.hasKey("type")) stroke.getString("type") ?: "brush" else "brush"
1734
+ val colorHex = if (stroke.hasKey("color")) stroke.getString("color") else "#EF4444"
1735
+ val parsedColor = parseInspectorHexColor(colorHex, android.graphics.Color.RED)
1736
+ val strokeW = (if (stroke.hasKey("strokeWidth")) stroke.getDouble("strokeWidth").toFloat() else 4.0f) * baseScale
1737
+ val isNorm = if (stroke.hasKey("isNormalized")) stroke.getBoolean("isNormalized") else true
1738
+ val points = if (stroke.hasKey("points")) stroke.getArray("points") else null
1739
+
1740
+ when (type) {
1741
+ "brush" -> {
1742
+ if (points != null && points.size() > 1) {
1743
+ strokePaint.style = android.graphics.Paint.Style.STROKE
1744
+ strokePaint.color = parsedColor
1745
+ strokePaint.strokeWidth = strokeW
1746
+ strokePaint.strokeCap = android.graphics.Paint.Cap.ROUND
1747
+ strokePaint.strokeJoin = android.graphics.Paint.Join.ROUND
1748
+ strokePaint.alpha = 255
1749
+
1750
+ val path = android.graphics.Path()
1751
+ for (pIdx in 0 until points.size()) {
1752
+ val pt = points.getMap(pIdx) ?: continue
1753
+ val px = (if (pt.hasKey("x")) pt.getDouble("x").toFloat() else 0f) * (if (isNorm) canvasW else 1f)
1754
+ val py = (if (pt.hasKey("y")) pt.getDouble("y").toFloat() else 0f) * (if (isNorm) canvasH else 1f)
1755
+ if (pIdx == 0) path.moveTo(px, py) else path.lineTo(px, py)
1756
+ }
1757
+ canvas.drawPath(path, strokePaint)
1758
+ }
1759
+ }
1760
+ "highlighter" -> {
1761
+ if (points != null && points.size() > 1) {
1762
+ strokePaint.style = android.graphics.Paint.Style.STROKE
1763
+ strokePaint.color = parsedColor
1764
+ strokePaint.strokeWidth = strokeW * 2.5f
1765
+ strokePaint.strokeCap = android.graphics.Paint.Cap.ROUND
1766
+ strokePaint.strokeJoin = android.graphics.Paint.Join.ROUND
1767
+ strokePaint.alpha = (255 * 0.4f).toInt()
1768
+
1769
+ val path = android.graphics.Path()
1770
+ for (pIdx in 0 until points.size()) {
1771
+ val pt = points.getMap(pIdx) ?: continue
1772
+ val px = (if (pt.hasKey("x")) pt.getDouble("x").toFloat() else 0f) * (if (isNorm) canvasW else 1f)
1773
+ val py = (if (pt.hasKey("y")) pt.getDouble("y").toFloat() else 0f) * (if (isNorm) canvasH else 1f)
1774
+ if (pIdx == 0) path.moveTo(px, py) else path.lineTo(px, py)
1775
+ }
1776
+ canvas.drawPath(path, strokePaint)
1777
+ }
1778
+ }
1779
+ "arrow" -> {
1780
+ if (points != null && points.size() >= 2) {
1781
+ val p0 = points.getMap(0)
1782
+ val p1 = points.getMap(points.size() - 1)
1783
+ if (p0 != null && p1 != null) {
1784
+ val x0 = (if (p0.hasKey("x")) p0.getDouble("x").toFloat() else 0f) * (if (isNorm) canvasW else 1f)
1785
+ val y0 = (if (p0.hasKey("y")) p0.getDouble("y").toFloat() else 0f) * (if (isNorm) canvasH else 1f)
1786
+ val x1 = (if (p1.hasKey("x")) p1.getDouble("x").toFloat() else 0f) * (if (isNorm) canvasW else 1f)
1787
+ val y1 = (if (p1.hasKey("y")) p1.getDouble("y").toFloat() else 0f) * (if (isNorm) canvasH else 1f)
1788
+
1789
+ strokePaint.style = android.graphics.Paint.Style.STROKE
1790
+ strokePaint.color = parsedColor
1791
+ strokePaint.strokeWidth = strokeW
1792
+ strokePaint.strokeCap = android.graphics.Paint.Cap.ROUND
1793
+ strokePaint.alpha = 255
1794
+ canvas.drawLine(x0, y0, x1, y1, strokePaint)
1795
+
1796
+ val dx = x1 - x0
1797
+ val dy = y1 - y0
1798
+ val angle = Math.atan2(dy.toDouble(), dx.toDouble())
1799
+ val headLen = Math.max(14.0 * baseScale, Math.min(32.0 * baseScale, (strokeW * 3.5).toDouble()))
1800
+ val headAngle = Math.PI / 6.0
1801
+ val ax1 = (x1 - headLen * Math.cos(angle - headAngle)).toFloat()
1802
+ val ay1 = (y1 - headLen * Math.sin(angle - headAngle)).toFloat()
1803
+ val ax2 = (x1 - headLen * Math.cos(angle + headAngle)).toFloat()
1804
+ val ay2 = (y1 - headLen * Math.sin(angle + headAngle)).toFloat()
1805
+
1806
+ val arrowPath = android.graphics.Path().apply {
1807
+ moveTo(x1, y1)
1808
+ lineTo(ax1, ay1)
1809
+ lineTo(ax2, ay2)
1810
+ close()
1811
+ }
1812
+ strokePaint.style = android.graphics.Paint.Style.FILL
1813
+ canvas.drawPath(arrowPath, strokePaint)
1814
+ }
1815
+ }
1816
+ }
1817
+ "rect" -> {
1818
+ if (points != null && points.size() >= 2) {
1819
+ val p0 = points.getMap(0) ?: continue
1820
+ val p1 = points.getMap(1) ?: p0
1821
+ val x0 = (if (p0.hasKey("x")) p0.getDouble("x").toFloat() else 0f) * (if (isNorm) canvasW else 1f)
1822
+ val y0 = (if (p0.hasKey("y")) p0.getDouble("y").toFloat() else 0f) * (if (isNorm) canvasH else 1f)
1823
+ val x1 = (if (p1.hasKey("x")) p1.getDouble("x").toFloat() else 0f) * (if (isNorm) canvasW else 1f)
1824
+ val y1 = (if (p1.hasKey("y")) p1.getDouble("y").toFloat() else 0f) * (if (isNorm) canvasH else 1f)
1825
+
1826
+ strokePaint.style = android.graphics.Paint.Style.STROKE
1827
+ strokePaint.color = parsedColor
1828
+ strokePaint.strokeWidth = strokeW
1829
+ strokePaint.alpha = 255
1830
+ canvas.drawRect(Math.min(x0, x1), Math.min(y0, y1), Math.max(x0, x1), Math.max(y0, y1), strokePaint)
1831
+ }
1832
+ }
1833
+ "circle", "spotlight" -> {
1834
+ if (points != null && points.size() >= 2) {
1835
+ val p0 = points.getMap(0) ?: continue
1836
+ val p1 = points.getMap(1) ?: p0
1837
+ val x0 = (if (p0.hasKey("x")) p0.getDouble("x").toFloat() else 0f) * (if (isNorm) canvasW else 1f)
1838
+ val y0 = (if (p0.hasKey("y")) p0.getDouble("y").toFloat() else 0f) * (if (isNorm) canvasH else 1f)
1839
+ val x1 = (if (p1.hasKey("x")) p1.getDouble("x").toFloat() else 0f) * (if (isNorm) canvasW else 1f)
1840
+ val y1 = (if (p1.hasKey("y")) p1.getDouble("y").toFloat() else 0f) * (if (isNorm) canvasH else 1f)
1841
+
1842
+ strokePaint.style = android.graphics.Paint.Style.STROKE
1843
+ strokePaint.color = parsedColor
1844
+ strokePaint.strokeWidth = strokeW
1845
+ strokePaint.alpha = 255
1846
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
1847
+ canvas.drawOval(Math.min(x0, x1), Math.min(y0, y1), Math.max(x0, x1), Math.max(y0, y1), strokePaint)
1848
+ } else {
1849
+ canvas.drawOval(android.graphics.RectF(Math.min(x0, x1), Math.min(y0, y1), Math.max(x0, x1), Math.max(y0, y1)), strokePaint)
1850
+ }
1851
+ }
1852
+ }
1853
+ "step" -> {
1854
+ if (points != null && points.size() > 0) {
1855
+ val p0 = points.getMap(0) ?: continue
1856
+ val cx = (if (p0.hasKey("x")) p0.getDouble("x").toFloat() else 0f) * (if (isNorm) canvasW else 1f)
1857
+ val cy = (if (p0.hasKey("y")) p0.getDouble("y").toFloat() else 0f) * (if (isNorm) canvasH else 1f)
1858
+ val radius = 16f * baseScale
1859
+
1860
+ // Badge circle
1861
+ strokePaint.style = android.graphics.Paint.Style.FILL
1862
+ strokePaint.color = parsedColor
1863
+ strokePaint.alpha = 255
1864
+ canvas.drawCircle(cx, cy, radius, strokePaint)
1865
+
1866
+ // White border
1867
+ strokePaint.style = android.graphics.Paint.Style.STROKE
1868
+ strokePaint.color = android.graphics.Color.WHITE
1869
+ strokePaint.strokeWidth = 2f * baseScale
1870
+ canvas.drawCircle(cx, cy, radius, strokePaint)
1871
+
1872
+ // Step number
1873
+ val stepNum = if (stroke.hasKey("stepNumber")) stroke.getInt("stepNumber") else 1
1874
+ val textPaint = android.graphics.Paint(android.graphics.Paint.ANTI_ALIAS_FLAG).apply {
1875
+ color = android.graphics.Color.WHITE
1876
+ textSize = 14f * baseScale
1877
+ typeface = android.graphics.Typeface.DEFAULT_BOLD
1878
+ textAlign = android.graphics.Paint.Align.CENTER
1879
+ }
1880
+ val fontMetrics = textPaint.fontMetrics
1881
+ val textY = cy - (fontMetrics.ascent + fontMetrics.descent) / 2f
1882
+ canvas.drawText(stepNum.toString(), cx, textY, textPaint)
1883
+ }
1884
+ }
1885
+ }
1886
+ }
1887
+ }
1888
+ }
1889
+
1890
+ // C. Draggable Text Badges / Notes
1891
+ if (options.hasKey("texts")) {
1892
+ val texts = options.getArray("texts")
1893
+ if (texts != null) {
1894
+ for (i in 0 until texts.size()) {
1895
+ val tItem = texts.getMap(i) ?: continue
1896
+ val textStr = if (tItem.hasKey("text")) tItem.getString("text") ?: "" else ""
1897
+ if (textStr.isEmpty()) continue
1898
+
1899
+ val isNorm = if (tItem.hasKey("isNormalized")) tItem.getBoolean("isNormalized") else true
1900
+ val tx = (if (tItem.hasKey("x")) tItem.getDouble("x").toFloat() else 0f) * (if (isNorm) canvasW else 1f)
1901
+ val ty = (if (tItem.hasKey("y")) tItem.getDouble("y").toFloat() else 0f) * (if (isNorm) canvasH else 1f)
1902
+ val textColor = parseInspectorHexColor(if (tItem.hasKey("color")) tItem.getString("color") else null, android.graphics.Color.WHITE)
1903
+ val bgColor = parseInspectorHexColor(if (tItem.hasKey("bgColor")) tItem.getString("bgColor") else null, parseInspectorHexColor("#EF4444"))
1904
+
1905
+ val textPaint = android.graphics.Paint(android.graphics.Paint.ANTI_ALIAS_FLAG).apply {
1906
+ color = textColor
1907
+ textSize = 15f * baseScale
1908
+ typeface = android.graphics.Typeface.DEFAULT_BOLD
1909
+ }
1910
+
1911
+ val textWidth = textPaint.measureText(textStr)
1912
+ val fontMetrics = textPaint.fontMetrics
1913
+ val textHeight = fontMetrics.descent - fontMetrics.ascent
1914
+ val padH = 12f * baseScale
1915
+ val padV = 6f * baseScale
1916
+ val pillW = textWidth + padH * 2f
1917
+ val pillH = textHeight + padV * 2f
1918
+
1919
+ val pillRect = android.graphics.RectF(tx, ty, tx + pillW, ty + pillH)
1920
+ val bgPaint = android.graphics.Paint(android.graphics.Paint.ANTI_ALIAS_FLAG).apply {
1921
+ style = android.graphics.Paint.Style.FILL
1922
+ color = bgColor
1923
+ }
1924
+ canvas.drawRoundRect(pillRect, pillH / 2f, pillH / 2f, bgPaint)
1925
+
1926
+ val borderPaint = android.graphics.Paint(android.graphics.Paint.ANTI_ALIAS_FLAG).apply {
1927
+ style = android.graphics.Paint.Style.STROKE
1928
+ color = android.graphics.Color.argb(100, 255, 255, 255)
1929
+ strokeWidth = 1.5f * baseScale
1930
+ }
1931
+ canvas.drawRoundRect(pillRect, pillH / 2f, pillH / 2f, borderPaint)
1932
+
1933
+ canvas.drawText(textStr, tx + padH, ty + padV - fontMetrics.ascent, textPaint)
1934
+ }
1935
+ }
1936
+ }
1937
+
1938
+ // D. Legacy / Standalone Annotations
1939
+ if (options.hasKey("annotations") && !options.hasKey("drawings")) {
1631
1940
  val annotations = options.getArray("annotations")
1632
1941
  if (annotations != null) {
1633
- overlayPaint.color = android.graphics.Color.RED
1634
- overlayPaint.style = android.graphics.Paint.Style.STROKE
1635
- overlayPaint.strokeWidth = 6f
1942
+ val overlayPaint = android.graphics.Paint(android.graphics.Paint.ANTI_ALIAS_FLAG)
1636
1943
  for (i in 0 until annotations.size()) {
1637
1944
  val ann = annotations.getMap(i) ?: continue
1638
1945
  var x = if (ann.hasKey("x")) ann.getDouble("x").toFloat() else 0f
1639
1946
  var y = if (ann.hasKey("y")) ann.getDouble("y").toFloat() else 0f
1640
1947
  var w = if (ann.hasKey("width")) ann.getDouble("width").toFloat() else 0f
1641
1948
  var h = if (ann.hasKey("height")) ann.getDouble("height").toFloat() else 0f
1642
- val isNorm = if (ann.hasKey("isNormalized")) ann.getBoolean("isNormalized") else false
1949
+ val isNorm = if (ann.hasKey("isNormalized")) ann.getBoolean("isNormalized") else true
1643
1950
  if (isNorm) {
1644
- x *= mutableBitmap.width
1645
- y *= mutableBitmap.height
1646
- w *= mutableBitmap.width
1647
- h *= mutableBitmap.height
1951
+ x *= canvasW
1952
+ y *= canvasH
1953
+ w *= canvasW
1954
+ h *= canvasH
1648
1955
  }
1956
+ val annColorHex = if (ann.hasKey("color")) ann.getString("color") else "#EF4444"
1957
+ val annColor = parseInspectorHexColor(annColorHex, android.graphics.Color.RED)
1958
+ overlayPaint.color = annColor
1959
+ overlayPaint.style = android.graphics.Paint.Style.STROKE
1960
+ overlayPaint.strokeWidth = 4f * baseScale
1649
1961
  canvas.drawRect(x, y, x + w, y + h, overlayPaint)
1962
+
1963
+ val label = if (ann.hasKey("label")) ann.getString("label") else null
1964
+ if (!label.isNullOrEmpty()) {
1965
+ val labelPaint = android.graphics.Paint(android.graphics.Paint.ANTI_ALIAS_FLAG).apply {
1966
+ color = android.graphics.Color.WHITE
1967
+ textSize = 13f * baseScale
1968
+ typeface = android.graphics.Typeface.DEFAULT_BOLD
1969
+ }
1970
+ val textWidth = labelPaint.measureText(label)
1971
+ val fontMetrics = labelPaint.fontMetrics
1972
+ val textHeight = fontMetrics.descent - fontMetrics.ascent
1973
+ val padH = 6f * baseScale
1974
+ val padV = 3f * baseScale
1975
+ val tagRect = android.graphics.RectF(x, Math.max(0f, y - textHeight - padV * 2f), x + textWidth + padH * 2f, y)
1976
+ val bgPaint = android.graphics.Paint(android.graphics.Paint.ANTI_ALIAS_FLAG).apply {
1977
+ style = android.graphics.Paint.Style.FILL
1978
+ color = annColor
1979
+ }
1980
+ canvas.drawRect(tagRect, bgPaint)
1981
+ canvas.drawText(label, tagRect.left + padH, tagRect.bottom - padV - fontMetrics.descent, labelPaint)
1982
+ }
1650
1983
  }
1651
1984
  }
1652
1985
  }
@@ -1933,6 +2266,106 @@ class NetworkInspectorModule(private val reactContext: ReactApplicationContext)
1933
2266
 
1934
2267
 
1935
2268
 
2269
+ @ReactMethod
2270
+ fun writeExportFile(filename: String, content: String, promise: Promise) {
2271
+ captureExecutor.execute {
2272
+ try {
2273
+ val dir = getCapturesDirectory()
2274
+ val cleanFilename = File(filename).name
2275
+ val file = File(dir, cleanFilename)
2276
+ file.writeText(content, Charsets.UTF_8)
2277
+ promise.resolve("file://${file.absolutePath}")
2278
+ } catch (e: Exception) {
2279
+ promise.reject("WRITE_ERROR", e.message ?: "Failed to write export file", e)
2280
+ }
2281
+ }
2282
+ }
2283
+
2284
+ @ReactMethod
2285
+ fun shareFile(filePath: String, mimeType: String?, title: String?, promise: Promise) {
2286
+ val activity = reactContext.currentActivity
2287
+ if (activity == null) {
2288
+ promise.reject("NO_ACTIVITY", "Current activity is null")
2289
+ return
2290
+ }
2291
+
2292
+ try {
2293
+ val cleanPath = when {
2294
+ filePath.startsWith("file://") -> Uri.parse(filePath).path ?: filePath.substring(7)
2295
+ else -> filePath
2296
+ }
2297
+ val file = File(cleanPath)
2298
+ if (!file.exists()) {
2299
+ promise.reject("FILE_NOT_FOUND", "File does not exist: $filePath")
2300
+ return
2301
+ }
2302
+
2303
+ val uri: Uri = try {
2304
+ androidx.core.content.FileProvider.getUriForFile(
2305
+ activity,
2306
+ "${activity.packageName}.inappinspector.provider",
2307
+ file
2308
+ )
2309
+ } catch (e: Exception) {
2310
+ try {
2311
+ androidx.core.content.FileProvider.getUriForFile(
2312
+ activity,
2313
+ "${activity.packageName}.provider",
2314
+ file
2315
+ )
2316
+ } catch (e2: Exception) {
2317
+ Uri.fromFile(file)
2318
+ }
2319
+ }
2320
+
2321
+ val resolvedMime = mimeType ?: when {
2322
+ file.name.endsWith(".json") -> "application/json"
2323
+ file.name.endsWith(".txt") || file.name.endsWith(".log") -> "text/plain"
2324
+ file.name.endsWith(".png") -> "image/png"
2325
+ file.name.endsWith(".jpg") || file.name.endsWith(".jpeg") -> "image/jpeg"
2326
+ file.name.endsWith(".mp4") -> "video/mp4"
2327
+ file.name.endsWith(".gif") -> "image/gif"
2328
+ else -> "*/*"
2329
+ }
2330
+
2331
+ val sendIntent = Intent(Intent.ACTION_SEND).apply {
2332
+ type = resolvedMime
2333
+ putExtra(Intent.EXTRA_STREAM, uri)
2334
+ if (!title.isNullOrEmpty()) {
2335
+ putExtra(Intent.EXTRA_SUBJECT, title)
2336
+ }
2337
+ addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
2338
+ }
2339
+
2340
+ val chooser = Intent.createChooser(sendIntent, title ?: "Share File").apply {
2341
+ addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
2342
+ addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
2343
+ }
2344
+
2345
+ try {
2346
+ val resInfoList = activity.packageManager.queryIntentActivities(chooser, android.content.pm.PackageManager.MATCH_DEFAULT_ONLY)
2347
+ for (resolveInfo in resInfoList) {
2348
+ val packageName = resolveInfo.activityInfo?.packageName
2349
+ if (!packageName.isNullOrEmpty()) {
2350
+ try {
2351
+ activity.grantUriPermission(packageName, uri, Intent.FLAG_GRANT_READ_URI_PERMISSION)
2352
+ } catch (e: Exception) {}
2353
+ }
2354
+ }
2355
+ } catch (e: Exception) {}
2356
+
2357
+ activity.startActivity(chooser)
2358
+ promise.resolve(true)
2359
+ } catch (e: Exception) {
2360
+ promise.reject("SHARE_ERROR", e.message ?: "Failed to share file", e)
2361
+ }
2362
+ }
2363
+
2364
+ @ReactMethod
2365
+ fun addListener(eventName: String) {
2366
+ // Required for React Native NativeEventEmitter
2367
+ }
2368
+
1936
2369
  @ReactMethod
1937
2370
  fun removeListeners(count: Double) {
1938
2371
  // Required for React Native NativeEventEmitter
@@ -1941,11 +2374,25 @@ class NetworkInspectorModule(private val reactContext: ReactApplicationContext)
1941
2374
  override fun invalidate() {
1942
2375
  super.invalidate()
1943
2376
  try {
2377
+ reactContext.removeActivityEventListener(activityEventListener)
1944
2378
  sensorManager?.unregisterListener(shakeListener)
1945
2379
  if (isFpsMonitoring) {
1946
2380
  isFpsMonitoring = false
1947
2381
  android.view.Choreographer.getInstance().removeFrameCallback(frameCallback)
1948
2382
  }
2383
+ if (isRecordingVideo) {
2384
+ isRecordingVideo = false
2385
+ recordingTimer?.cancel()
2386
+ recordingTimer = null
2387
+ isFrameCapturing.set(false)
2388
+ }
2389
+ captureHandlerThread?.quitSafely()
2390
+ captureHandlerThread = null
2391
+ captureBackgroundHandler = null
2392
+ synchronized(recordedFrames) {
2393
+ recordedFrames.forEach { it.recycle() }
2394
+ recordedFrames.clear()
2395
+ }
1949
2396
  floatingButton?.let { btn ->
1950
2397
  val parent = btn.parent as? android.view.ViewGroup
1951
2398
  parent?.post {