shakebug-react-native 1.0.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 (296) hide show
  1. package/DeviceInfo/index.js.flow +177 -0
  2. package/DeviceInfo/index.ts +1034 -0
  3. package/DeviceInfo/internal/asyncHookWrappers.ts +59 -0
  4. package/DeviceInfo/internal/devicesWithDynamicIsland.ts +30 -0
  5. package/DeviceInfo/internal/devicesWithNotch.ts +374 -0
  6. package/DeviceInfo/internal/nativeInterface.ts +28 -0
  7. package/DeviceInfo/internal/privateTypes.ts +231 -0
  8. package/DeviceInfo/internal/supported-platform-info.ts +97 -0
  9. package/DeviceInfo/internal/types.ts +19 -0
  10. package/DeviceInfo/web/index.js +223 -0
  11. package/GetLocals/src/NativeRNLocalize.ts +18 -0
  12. package/GetLocals/src/constants.ts +269 -0
  13. package/GetLocals/src/index.ts +56 -0
  14. package/GetLocals/src/module.ts +51 -0
  15. package/GetLocals/src/module.web.ts +148 -0
  16. package/GetLocals/src/types.ts +31 -0
  17. package/GetLocation/LocationError.ts +20 -0
  18. package/GetLocation/index.ts +46 -0
  19. package/GetLocation/utils.ts +89 -0
  20. package/ImageOrVedioPicker/src/index.ts +28 -0
  21. package/ImageOrVedioPicker/src/platforms/NativeImagePicker.ts +10 -0
  22. package/ImageOrVedioPicker/src/platforms/native.ts +61 -0
  23. package/ImageOrVedioPicker/src/platforms/web.ts +159 -0
  24. package/ImageOrVedioPicker/src/types.ts +74 -0
  25. package/NetInfo/src/__tests__/eventListenerCallbacks.spec.ts +332 -0
  26. package/NetInfo/src/__tests__/fetch.spec.ts +479 -0
  27. package/NetInfo/src/index.ts +186 -0
  28. package/NetInfo/src/internal/__mocks__/nativeModule.ts +13 -0
  29. package/NetInfo/src/internal/defaultConfiguration.ts +17 -0
  30. package/NetInfo/src/internal/defaultConfiguration.web.ts +17 -0
  31. package/NetInfo/src/internal/internetReachability.ts +180 -0
  32. package/NetInfo/src/internal/nativeInterface.ts +43 -0
  33. package/NetInfo/src/internal/nativeInterface.web.ts +27 -0
  34. package/NetInfo/src/internal/nativeModule.ts +15 -0
  35. package/NetInfo/src/internal/nativeModule.web.ts +306 -0
  36. package/NetInfo/src/internal/privateTypes.ts +41 -0
  37. package/NetInfo/src/internal/state.ts +137 -0
  38. package/NetInfo/src/internal/types.ts +128 -0
  39. package/README.md +246 -0
  40. package/RecordScreen/src/index.tsx +75 -0
  41. package/ScreenShot/src/RNViewShot.js +3 -0
  42. package/ScreenShot/src/RNViewShot.web.js +42 -0
  43. package/ScreenShot/src/index.js +308 -0
  44. package/Sensor/src/index.js +14 -0
  45. package/Sensor/src/rnsensors.js +57 -0
  46. package/Sensor/src/sensors.js +97 -0
  47. package/VideoPlayer/PlayVideo.tsx +51 -0
  48. package/VideoPlayer/index.js +69 -0
  49. package/android/README.md +14 -0
  50. package/android/build/generated/source/buildConfig/debug/com/shakebug/BuildConfig.java +10 -0
  51. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +42 -0
  52. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +18 -0
  53. package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +6 -0
  54. package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +1 -0
  55. package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  56. package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  57. package/android/build/intermediates/compile_symbol_list/debug/R.txt +47 -0
  58. package/android/build/intermediates/compiled_local_resources/debug/out/xml_imagepicker_provider_paths.xml.flat +0 -0
  59. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +12 -0
  60. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  61. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  62. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  63. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  64. package/android/build/intermediates/javac/debug/classes/com/shakebug/BuildConfig.class +0 -0
  65. package/android/build/intermediates/javac/debug/classes/com/shakebug/CustomMediaMetadataRetriever.class +0 -0
  66. package/android/build/intermediates/javac/debug/classes/com/shakebug/ImageMetadata.class +0 -0
  67. package/android/build/intermediates/javac/debug/classes/com/shakebug/ImagePickerProvider.class +0 -0
  68. package/android/build/intermediates/javac/debug/classes/com/shakebug/Metadata.class +0 -0
  69. package/android/build/intermediates/javac/debug/classes/com/shakebug/Options.class +0 -0
  70. package/android/build/intermediates/javac/debug/classes/com/shakebug/RecordScreenModule$1.class +0 -0
  71. package/android/build/intermediates/javac/debug/classes/com/shakebug/RecordScreenModule.class +0 -0
  72. package/android/build/intermediates/javac/debug/classes/com/shakebug/Shakebug.class +0 -0
  73. package/android/build/intermediates/javac/debug/classes/com/shakebug/ShakebugPackage.class +0 -0
  74. package/android/build/intermediates/javac/debug/classes/com/shakebug/Utility.class +0 -0
  75. package/android/build/intermediates/javac/debug/classes/com/shakebug/Utils.class +0 -0
  76. package/android/build/intermediates/javac/debug/classes/com/shakebug/VideoMetadata.class +0 -0
  77. package/android/build/intermediates/javac/debug/classes/com/shakebug/ViewShot$1.class +0 -0
  78. package/android/build/intermediates/javac/debug/classes/com/shakebug/ViewShot$2.class +0 -0
  79. package/android/build/intermediates/javac/debug/classes/com/shakebug/ViewShot$Formats.class +0 -0
  80. package/android/build/intermediates/javac/debug/classes/com/shakebug/ViewShot$Results.class +0 -0
  81. package/android/build/intermediates/javac/debug/classes/com/shakebug/ViewShot$ReusableByteArrayOutputStream.class +0 -0
  82. package/android/build/intermediates/javac/debug/classes/com/shakebug/ViewShot.class +0 -0
  83. package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +49 -0
  84. package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +82 -0
  85. package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +42 -0
  86. package/android/build/intermediates/navigation_json/debug/navigation.json +1 -0
  87. package/android/build/intermediates/packaged_res/debug/values/values.xml +25 -0
  88. package/android/build/intermediates/packaged_res/debug/xml/imagepicker_provider_paths.xml +4 -0
  89. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/BuildConfig.class +0 -0
  90. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/CustomMediaMetadataRetriever.class +0 -0
  91. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/ImageMetadata.class +0 -0
  92. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/ImagePickerProvider.class +0 -0
  93. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/Metadata.class +0 -0
  94. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/Options.class +0 -0
  95. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/RecordScreenModule$1.class +0 -0
  96. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/RecordScreenModule.class +0 -0
  97. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/Shakebug.class +0 -0
  98. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/ShakebugPackage.class +0 -0
  99. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/Utility.class +0 -0
  100. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/Utils.class +0 -0
  101. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/VideoMetadata.class +0 -0
  102. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/ViewShot$1.class +0 -0
  103. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/ViewShot$2.class +0 -0
  104. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/ViewShot$Formats.class +0 -0
  105. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/ViewShot$Results.class +0 -0
  106. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/ViewShot$ReusableByteArrayOutputStream.class +0 -0
  107. package/android/build/intermediates/runtime_library_classes_dir/debug/com/shakebug/ViewShot.class +0 -0
  108. package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +48 -0
  109. package/android/build/outputs/logs/manifest-merger-debug-report.txt +97 -0
  110. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  111. package/android/build.gradle +235 -0
  112. package/android/src/main/AndroidManifest.xml +40 -0
  113. package/android/src/main/java/com/shakebug/AmazonFireDeviceConnectivityPoller.java +170 -0
  114. package/android/src/main/java/com/shakebug/BaseUtils.java +33 -0
  115. package/android/src/main/java/com/shakebug/BroadcastReceiverConnectivityReceiver.java +131 -0
  116. package/android/src/main/java/com/shakebug/ConnectivityReceiver.java +318 -0
  117. package/android/src/main/java/com/shakebug/CrashLoggerModule.java +48 -0
  118. package/android/src/main/java/com/shakebug/DateUtil.java +64 -0
  119. package/android/src/main/java/com/shakebug/DeviceType.java +18 -0
  120. package/android/src/main/java/com/shakebug/DeviceUtil.java +46 -0
  121. package/android/src/main/java/com/shakebug/DrawingView.java +90 -0
  122. package/android/src/main/java/com/shakebug/DrawingViewManager.java +38 -0
  123. package/android/src/main/java/com/shakebug/GetLocation.java +147 -0
  124. package/android/src/main/java/com/shakebug/ImageMetadata.java +42 -0
  125. package/android/src/main/java/com/shakebug/ImagePickerProvider.java +8 -0
  126. package/android/src/main/java/com/shakebug/Metadata.java +46 -0
  127. package/android/src/main/java/com/shakebug/NetInfoModule.java +79 -0
  128. package/android/src/main/java/com/shakebug/NetInfoUtils.java +50 -0
  129. package/android/src/main/java/com/shakebug/NetworkCallbackConnectivityReceiver.java +209 -0
  130. package/android/src/main/java/com/shakebug/Options.java +42 -0
  131. package/android/src/main/java/com/shakebug/RNDeviceModule.java +1036 -0
  132. package/android/src/main/java/com/shakebug/RNInstallReferrerClient.java +124 -0
  133. package/android/src/main/java/com/shakebug/RNLocalizeModule.java +79 -0
  134. package/android/src/main/java/com/shakebug/RNLocalizeModuleImpl.java +258 -0
  135. package/android/src/main/java/com/shakebug/ReactNativeGetLocationModule.java +95 -0
  136. package/android/src/main/java/com/shakebug/RecordScreenModule.java +202 -0
  137. package/android/src/main/java/com/shakebug/ScreenshotDetectorModule.java +63 -0
  138. package/android/src/main/java/com/shakebug/SettingsUtil.java +44 -0
  139. package/android/src/main/java/com/shakebug/Shakebug.java +181 -0
  140. package/android/src/main/java/com/shakebug/ShakebugPackage.java +75 -0
  141. package/android/src/main/java/com/shakebug/ShakebugSDKImagePickerModule.java +56 -0
  142. package/android/src/main/java/com/shakebug/ShakebugSDKImagePickerModuleImpl.java +230 -0
  143. package/android/src/main/java/com/shakebug/ShakebugSDKScreenShotModule.java +196 -0
  144. package/android/src/main/java/com/shakebug/SharedPreferencesModule.java +39 -0
  145. package/android/src/main/java/com/shakebug/UnitConverter.java +48 -0
  146. package/android/src/main/java/com/shakebug/Utility.java +29 -0
  147. package/android/src/main/java/com/shakebug/Utils.java +593 -0
  148. package/android/src/main/java/com/shakebug/VideoMetadata.java +91 -0
  149. package/android/src/main/java/com/shakebug/VideoPlayerModule.java +199 -0
  150. package/android/src/main/java/com/shakebug/VideoThumbnailModule.java +215 -0
  151. package/android/src/main/java/com/shakebug/VideoTrimModule.java +372 -0
  152. package/android/src/main/java/com/shakebug/ViewShot.java +627 -0
  153. package/android/src/main/java/com/shakebug/adapters/VideoTrimmerAdapter.java +54 -0
  154. package/android/src/main/java/com/shakebug/callback/SingleCallback.java +11 -0
  155. package/android/src/main/java/com/shakebug/interfaces/IVideoTrimmerView.java +5 -0
  156. package/android/src/main/java/com/shakebug/interfaces/VideoPlayerListner.java +5 -0
  157. package/android/src/main/java/com/shakebug/interfaces/VideoTrimListener.java +10 -0
  158. package/android/src/main/java/com/shakebug/resolver/DeviceIdResolver.java +87 -0
  159. package/android/src/main/java/com/shakebug/resolver/DeviceTypeResolver.java +94 -0
  160. package/android/src/main/java/com/shakebug/thread/BackgroundExecutor.java +246 -0
  161. package/android/src/main/java/com/shakebug/thread/UiThreadExecutor.java +120 -0
  162. package/android/src/main/java/com/shakebug/types/CellularGeneration.java +60 -0
  163. package/android/src/main/java/com/shakebug/types/ConnectionType.java +26 -0
  164. package/android/src/main/java/com/shakebug/utils/StorageUtil.java +139 -0
  165. package/android/src/main/java/com/shakebug/utils/VideoTrimmerUtil.java +89 -0
  166. package/android/src/main/java/com/shakebug/widgets/RangeSeekBarView.java +534 -0
  167. package/android/src/main/java/com/shakebug/widgets/SpacesItemDecoration2.java +32 -0
  168. package/android/src/main/java/com/shakebug/widgets/VideoPlayerView.java +429 -0
  169. package/android/src/main/java/com/shakebug/widgets/VideoTrimmerView.java +477 -0
  170. package/android/src/main/java/com/shakebug/widgets/ZVideoView.java +48 -0
  171. package/android/src/main/res/drawable/custom_progress.xml +16 -0
  172. package/android/src/main/res/drawable/custom_thumb.xml +4 -0
  173. package/android/src/main/res/drawable/ic_close_button.xml +10 -0
  174. package/android/src/main/res/drawable/ic_video_pause_black.png +0 -0
  175. package/android/src/main/res/drawable/ic_video_play_black.png +0 -0
  176. package/android/src/main/res/drawable/ic_video_thumb_handle.png +0 -0
  177. package/android/src/main/res/drawable/icon_seek_bar.png +0 -0
  178. package/android/src/main/res/layout/video_player_view.xml +121 -0
  179. package/android/src/main/res/layout/video_thumb_item_layout.xml +16 -0
  180. package/android/src/main/res/layout/video_trimmer_view.xml +148 -0
  181. package/android/src/main/res/values/colors.xml +17 -0
  182. package/android/src/main/res/values/strings.xml +14 -0
  183. package/android/src/main/res/xml/imagepicker_provider_paths.xml +4 -0
  184. package/ios/CammeraPermission/RNCameraPermission.h +16 -0
  185. package/ios/CammeraPermission/RNCameraPermission.m +46 -0
  186. package/ios/DeviceInfo/DeviceUID.h +14 -0
  187. package/ios/DeviceInfo/DeviceUID.m +202 -0
  188. package/ios/DeviceInfo/EnvironmentUtil.h +41 -0
  189. package/ios/DeviceInfo/EnvironmentUtil.m +56 -0
  190. package/ios/DeviceInfo/RNDeviceInfo.h +22 -0
  191. package/ios/DeviceInfo/RNDeviceInfo.m +918 -0
  192. package/ios/GetLocals/ShakebugSDKRNLocalize.h +21 -0
  193. package/ios/GetLocals/ShakebugSDKRNLocalize.m +296 -0
  194. package/ios/GetLocation/SettingsUtil.h +16 -0
  195. package/ios/GetLocation/SettingsUtil.m +21 -0
  196. package/ios/GetLocation/ShakebugSDKLocationModule.h +17 -0
  197. package/ios/GetLocation/ShakebugSDKLocationModule.m +218 -0
  198. package/ios/ImageOrVideoPicker/ShakebugSDKImagePickerManager.h +40 -0
  199. package/ios/ImageOrVideoPicker/ShakebugSDKImagePickerManager.m +588 -0
  200. package/ios/ImageOrVideoPicker/ShakebugSDKImagePickerUtils.h +26 -0
  201. package/ios/ImageOrVideoPicker/ShakebugSDKImagePickerUtils.m +194 -0
  202. package/ios/MicrophonePermissionManager.h +14 -0
  203. package/ios/MicrophonePermissionManager.m +35 -0
  204. package/ios/NetInfo/RNCConnectionState.h +42 -0
  205. package/ios/NetInfo/RNCConnectionState.m +119 -0
  206. package/ios/NetInfo/RNCConnectionStateWatcher.h +31 -0
  207. package/ios/NetInfo/RNCConnectionStateWatcher.m +136 -0
  208. package/ios/NetInfo/RNCNetInfo.h +13 -0
  209. package/ios/NetInfo/RNCNetInfo.m +269 -0
  210. package/ios/RecordScreen/ShakebugSDKRecordScreen.h +31 -0
  211. package/ios/RecordScreen/ShakebugSDKRecordScreen.m +309 -0
  212. package/ios/ScreenShot/ShakebugSDKRNViewShot.h +6 -0
  213. package/ios/ScreenShot/ShakebugSDKRNViewShot.m +186 -0
  214. package/ios/ScreenshotDetector/ScreenShotDetector.h +12 -0
  215. package/ios/ScreenshotDetector/ScreenShotDetector.m +37 -0
  216. package/ios/Senors/RNSensorsAccelerometer.h +22 -0
  217. package/ios/Senors/RNSensorsAccelerometer.m +162 -0
  218. package/ios/Senors/RNSensorsBarometer.h +22 -0
  219. package/ios/Senors/RNSensorsBarometer.m +141 -0
  220. package/ios/Senors/RNSensorsGravity.h +22 -0
  221. package/ios/Senors/RNSensorsGravity.m +165 -0
  222. package/ios/Senors/RNSensorsGyroscope.h +22 -0
  223. package/ios/Senors/RNSensorsGyroscope.m +160 -0
  224. package/ios/Senors/RNSensorsMagnetometer.h +22 -0
  225. package/ios/Senors/RNSensorsMagnetometer.m +163 -0
  226. package/ios/Senors/RNSensorsOrientation.h +22 -0
  227. package/ios/Senors/RNSensorsOrientation.m +189 -0
  228. package/ios/Senors/RNSensorsUtils.h +7 -0
  229. package/ios/Senors/RNSensorsUtils.m +9 -0
  230. package/ios/Shakebug.h +7 -0
  231. package/ios/Shakebug.m +16 -0
  232. package/ios/Shakebug.xcodeproj/project.pbxproj +872 -0
  233. package/ios/Shakebug.xcodeproj/xcshareddata/xcschemes/Shakebug.xcscheme +66 -0
  234. package/ios/Shakebug.xcworkspace/contents.xcworkspacedata +10 -0
  235. package/ios/Shakebug.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  236. package/ios/SketchCanvas/DrawingView.h +18 -0
  237. package/ios/SketchCanvas/DrawingView.m +96 -0
  238. package/ios/SketchCanvas/DrawingViewManager.h +12 -0
  239. package/ios/SketchCanvas/DrawingViewManager.m +35 -0
  240. package/ios/Storage/SharedPreferencesModule.h +13 -0
  241. package/ios/Storage/SharedPreferencesModule.m +35 -0
  242. package/ios/Thumbnaill/VideoThumbnailManager.h +12 -0
  243. package/ios/Thumbnaill/VideoThumbnailManager.m +73 -0
  244. package/ios/TrimVideo/ShakebugSDKVideoTrim.swift +372 -0
  245. package/ios/TrimVideo/VideoTrim-Bridging-Header.h +10 -0
  246. package/ios/TrimVideo/VideoTrim.m +23 -0
  247. package/ios/TrimVideo/VideoTrimmer.swift +810 -0
  248. package/ios/TrimVideo/VideoTrimmerThumb.swift +119 -0
  249. package/ios/TrimVideo/VideoTrimmerViewController.swift +301 -0
  250. package/ios/VideoPlayer/VideoPlayerModule.h +14 -0
  251. package/ios/VideoPlayer/VideoPlayerModule.m +29 -0
  252. package/ios/VideoPlayer/VideoPlayerViewController.h +18 -0
  253. package/ios/VideoPlayer/VideoPlayerViewController.m +29 -0
  254. package/package.json +45 -0
  255. package/shakebug-react-native.podspec +50 -0
  256. package/src/APIs/AddIssue.js +70 -0
  257. package/src/APIs/EndSession.js +32 -0
  258. package/src/APIs/Event.js +39 -0
  259. package/src/APIs/MatchKey.js +40 -0
  260. package/src/APIs/StartSession.js +84 -0
  261. package/src/Assets/images/OpenSketch.png +0 -0
  262. package/src/Assets/images/Push.png +0 -0
  263. package/src/Assets/images/RemoveTextView.png +0 -0
  264. package/src/Assets/images/black.png +0 -0
  265. package/src/Assets/images/blue.png +0 -0
  266. package/src/Assets/images/borderdBlack.png +0 -0
  267. package/src/Assets/images/borderdBlue.png +0 -0
  268. package/src/Assets/images/borderdGreen.png +0 -0
  269. package/src/Assets/images/borderdRed.png +0 -0
  270. package/src/Assets/images/borderdYellow.png +0 -0
  271. package/src/Assets/images/clear.png +0 -0
  272. package/src/Assets/images/close.png +0 -0
  273. package/src/Assets/images/green.png +0 -0
  274. package/src/Assets/images/next.png +0 -0
  275. package/src/Assets/images/play.png +0 -0
  276. package/src/Assets/images/red.png +0 -0
  277. package/src/Assets/images/shake.png +0 -0
  278. package/src/Assets/images/shakebugLogo.png +0 -0
  279. package/src/Assets/images/stopButton.png +0 -0
  280. package/src/Assets/images/text_icon.png +0 -0
  281. package/src/Assets/images/yellow.png +0 -0
  282. package/src/Componanats/CustomAlert.js +80 -0
  283. package/src/Componanats/ErrorHandler.js +80 -0
  284. package/src/Componanats/GlobalStateContext.js +22 -0
  285. package/src/Componanats/KeyboardAvoidingWrapper.js +43 -0
  286. package/src/Componanats/NavigationContext.js +42 -0
  287. package/src/Componanats/ShakeFunction.js +562 -0
  288. package/src/Componanats/localization.js +482 -0
  289. package/src/Screens/AddDetailsScreen.js +462 -0
  290. package/src/Screens/FirstScreen.js +629 -0
  291. package/src/Screens/Shakebug.js +487 -0
  292. package/src/Screens/StrockView.js +20 -0
  293. package/src/Screens/TrimVideoScreen.js +81 -0
  294. package/src/Screens/TutorialScreen.js +36 -0
  295. package/src/index.tsx +117 -0
  296. package/trimVideo/src/index.tsx +141 -0
@@ -0,0 +1,10 @@
1
+ package com.shakebug.interfaces;
2
+
3
+ public interface VideoTrimListener {
4
+ void onStartTrim();
5
+ void onTrimmingProgress(int percentage);
6
+ void onFinishTrim(String url);
7
+ void onError(String errorMessage);
8
+ void onCancel();
9
+ void onSave();
10
+ }
@@ -0,0 +1,87 @@
1
+ package com.shakebug.resolver;
2
+
3
+ import android.content.Context;
4
+ import android.content.SharedPreferences;
5
+ import android.os.Build;
6
+
7
+ import java.lang.reflect.InvocationTargetException;
8
+ import java.lang.reflect.Method;
9
+ import java.util.UUID;
10
+
11
+ import com.shakebug.RNDeviceModule;
12
+
13
+ /**
14
+ * Instance Id resolver's single purpose is to get the device's Instance Id
15
+ * author: Andres Aguilar
16
+ */
17
+ public class DeviceIdResolver {
18
+
19
+ private final Context context;
20
+
21
+ public DeviceIdResolver(Context context) {
22
+ this.context = context;
23
+ }
24
+
25
+ public String getInstanceIdSync() {
26
+ String instanceId = getInstanceIdFromPrefs();
27
+
28
+ if (instanceId != Build.UNKNOWN) {
29
+ return instanceId;
30
+ }
31
+
32
+ try {
33
+ instanceId = getFirebaseInstanceId();
34
+ setInstanceIdInPrefs(instanceId);
35
+ return instanceId;
36
+ } catch (ClassNotFoundException ignored) {
37
+ } catch (NoSuchMethodException | SecurityException | IllegalAccessException | InvocationTargetException e) {
38
+ System.err.println("N/A: Unsupported version of com.google.firebase:firebase-iid in your project.");
39
+ }
40
+
41
+ try {
42
+ instanceId = getGmsInstanceId();
43
+ setInstanceIdInPrefs(instanceId);
44
+ return instanceId;
45
+ } catch (ClassNotFoundException ignored) {
46
+ } catch (NoSuchMethodException | SecurityException | IllegalAccessException | InvocationTargetException e) {
47
+ System.err.println("N/A: Unsupported version of com.google.android.gms.iid in your project.");
48
+ }
49
+
50
+ instanceId = getUUIDInstanceId();
51
+ setInstanceIdInPrefs(instanceId);
52
+ return instanceId;
53
+ }
54
+
55
+ String getUUIDInstanceId() {
56
+ String uuidInstanceId = UUID.randomUUID().toString();
57
+ return uuidInstanceId;
58
+ }
59
+
60
+ String getInstanceIdFromPrefs() {
61
+ SharedPreferences prefs = RNDeviceModule.getRNDISharedPreferences(context);
62
+ String instanceId = prefs.getString("instanceId", Build.UNKNOWN);
63
+ return instanceId;
64
+ }
65
+
66
+ void setInstanceIdInPrefs(String instanceId) {
67
+ SharedPreferences.Editor editor = RNDeviceModule.getRNDISharedPreferences(context).edit();
68
+ editor.putString("instanceId", instanceId);
69
+ editor.apply();
70
+ }
71
+
72
+ String getGmsInstanceId() throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
73
+ Class<?> clazz = Class.forName("com.google.android.gms.iid.InstanceID");
74
+ Method method = clazz.getDeclaredMethod("getInstance", Context.class);
75
+ Object obj = method.invoke(null, context.getApplicationContext());
76
+ Method method1 = obj.getClass().getMethod("getId");
77
+ return (String) method1.invoke(obj);
78
+ }
79
+
80
+ String getFirebaseInstanceId() throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
81
+ Class<?> clazz = Class.forName("com.google.firebase.iid.FirebaseInstanceId");
82
+ Method method = clazz.getDeclaredMethod("getInstance");
83
+ Object obj = method.invoke(null);
84
+ Method method1 = obj.getClass().getMethod("getId");
85
+ return (String) method1.invoke(obj);
86
+ }
87
+ }
@@ -0,0 +1,94 @@
1
+ package com.shakebug.resolver;
2
+
3
+ import android.app.UiModeManager;
4
+ import android.content.Context;
5
+ import android.content.res.Configuration;
6
+ import android.os.Build;
7
+ import android.util.DisplayMetrics;
8
+ import android.view.WindowManager;
9
+
10
+ import com.shakebug.DeviceType;
11
+
12
+ /**
13
+ * Utility class used to get the device type, it's not dependant of React Native, allowing it to
14
+ * be shared with native code as well as RN through RNDeviceModule
15
+ * author: Andres Aguilar
16
+ */
17
+ public class DeviceTypeResolver {
18
+
19
+ private final Context context;
20
+
21
+ public DeviceTypeResolver(Context context) {
22
+ this.context = context;
23
+ }
24
+
25
+ public boolean isTablet() {
26
+ return getDeviceType() == DeviceType.TABLET;
27
+ }
28
+
29
+ public DeviceType getDeviceType() {
30
+ // Detect TVs via ui mode (Android TVs) or system features (Fire TV).
31
+ if (context.getPackageManager().hasSystemFeature("amazon.hardware.fire_tv")) {
32
+ return DeviceType.TV;
33
+ }
34
+
35
+ UiModeManager uiManager = (UiModeManager) context.getSystemService(Context.UI_MODE_SERVICE);
36
+ if (uiManager != null && uiManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_TELEVISION) {
37
+ return DeviceType.TV;
38
+ }
39
+
40
+ DeviceType deviceTypeFromConfig = getDeviceTypeFromResourceConfiguration();
41
+
42
+ if (deviceTypeFromConfig != null && deviceTypeFromConfig != DeviceType.UNKNOWN) {
43
+ return deviceTypeFromConfig;
44
+ }
45
+
46
+ return getDeviceTypeFromPhysicalSize();
47
+ }
48
+
49
+ // Use `smallestScreenWidthDp` to determine the screen size
50
+ // https://android-developers.googleblog.com/2011/07/new-tools-for-managing-screen-sizes.html
51
+ private DeviceType getDeviceTypeFromResourceConfiguration() {
52
+ int smallestScreenWidthDp = context.getResources().getConfiguration().smallestScreenWidthDp;
53
+
54
+ if (smallestScreenWidthDp == Configuration.SMALLEST_SCREEN_WIDTH_DP_UNDEFINED) {
55
+ return DeviceType.UNKNOWN;
56
+ }
57
+
58
+ return smallestScreenWidthDp >= 600 ? DeviceType.TABLET : DeviceType.HANDSET;
59
+ }
60
+
61
+ private DeviceType getDeviceTypeFromPhysicalSize() {
62
+ // Find the current window manager, if none is found we can't measure the device physical size.
63
+ WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
64
+
65
+ if (windowManager == null) {
66
+ return DeviceType.UNKNOWN;
67
+ }
68
+
69
+ // Get display metrics to see if we can differentiate handsets and tablets.
70
+ // NOTE: for API level 16 the metrics will exclude window decor.
71
+ DisplayMetrics metrics = new DisplayMetrics();
72
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
73
+ windowManager.getDefaultDisplay().getRealMetrics(metrics);
74
+ } else {
75
+ windowManager.getDefaultDisplay().getMetrics(metrics);
76
+ }
77
+
78
+ // Calculate physical size.
79
+ double widthInches = metrics.widthPixels / (double) metrics.xdpi;
80
+ double heightInches = metrics.heightPixels / (double) metrics.ydpi;
81
+ double diagonalSizeInches = Math.sqrt(Math.pow(widthInches, 2) + Math.pow(heightInches, 2));
82
+
83
+ if (diagonalSizeInches >= 3.0 && diagonalSizeInches <= 6.9) {
84
+ // Devices in a sane range for phones are considered to be Handsets.
85
+ return DeviceType.HANDSET;
86
+ } else if (diagonalSizeInches > 6.9 && diagonalSizeInches <= 18.0) {
87
+ // Devices larger than handset and in a sane range for tablets are tablets.
88
+ return DeviceType.TABLET;
89
+ } else {
90
+ // Otherwise, we don't know what device type we're on/
91
+ return DeviceType.UNKNOWN;
92
+ }
93
+ }
94
+ }
@@ -0,0 +1,246 @@
1
+ /**
2
+ * Copyright (C) 2010-2016 eBusiness Information, Excilys Group
3
+ * <p>
4
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5
+ * use this file except in compliance with the License. You may obtain a copy of
6
+ * the License at
7
+ * <p>
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ * <p>
10
+ * Unless required by applicable law or agreed To in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ * License for the specific language governing permissions and limitations under
14
+ * the License.
15
+ */
16
+ package com.shakebug.thread;
17
+
18
+ import android.util.Log;
19
+
20
+ import java.util.ArrayList;
21
+ import java.util.List;
22
+ import java.util.concurrent.Executor;
23
+ import java.util.concurrent.ExecutorService;
24
+ import java.util.concurrent.Executors;
25
+ import java.util.concurrent.Future;
26
+ import java.util.concurrent.ScheduledExecutorService;
27
+ import java.util.concurrent.TimeUnit;
28
+ import java.util.concurrent.atomic.AtomicBoolean;
29
+
30
+ public final class BackgroundExecutor {
31
+
32
+ private static final String TAG = "BackgroundExecutor";
33
+
34
+ public static final Executor DEFAULT_EXECUTOR = Executors.newScheduledThreadPool(2 * Runtime.getRuntime().availableProcessors());
35
+ private static Executor executor = DEFAULT_EXECUTOR;
36
+ private static final List<Task> TASKS = new ArrayList<>();
37
+ private static final ThreadLocal<String> CURRENT_SERIAL = new ThreadLocal<>();
38
+
39
+ private BackgroundExecutor() {
40
+ }
41
+
42
+ /**
43
+ * Execute a runnable after the given delay.
44
+ *
45
+ * @param runnable the task to execute
46
+ * @param delay the time from now to delay execution, in milliseconds
47
+ * <p>
48
+ * if <code>delay</code> is strictly positive and the current
49
+ * executor does not support scheduling (if
50
+ * Executor has been called with such an
51
+ * executor)
52
+ * @return Future associated to the running task
53
+ * @throws IllegalArgumentException if the current executor set by Executor
54
+ * does not support scheduling
55
+ */
56
+ private static Future<?> directExecute(Runnable runnable, long delay) {
57
+ Future<?> future = null;
58
+ if (delay > 0) {
59
+ /* no serial, but a delay: schedule the task */
60
+ if (!(executor instanceof ScheduledExecutorService)) {
61
+ throw new IllegalArgumentException("The executor set does not support scheduling");
62
+ }
63
+ ScheduledExecutorService scheduledExecutorService = (ScheduledExecutorService) executor;
64
+ future = scheduledExecutorService.schedule(runnable, delay, TimeUnit.MILLISECONDS);
65
+ } else {
66
+ if (executor instanceof ExecutorService) {
67
+ ExecutorService executorService = (ExecutorService) executor;
68
+ future = executorService.submit(runnable);
69
+ } else {
70
+ /* non-cancellable task */
71
+ executor.execute(runnable);
72
+ }
73
+ }
74
+ return future;
75
+ }
76
+
77
+ /**
78
+ * Execute a task after (at least) its delay <strong>and</strong> after all
79
+ * tasks added with the same non-null <code>serial</code> (if any) have
80
+ * completed execution.
81
+ *
82
+ * @param task the task to execute
83
+ * @throws IllegalArgumentException if <code>task.delay</code> is strictly positive and the
84
+ * current executor does not support scheduling (if
85
+ * Executor has been called with such an
86
+ * executor)
87
+ */
88
+ public static synchronized void execute(Task task) {
89
+ Future<?> future = null;
90
+ if (task.serial == null || !hasSerialRunning(task.serial)) {
91
+ task.executionAsked = true;
92
+ future = directExecute(task, task.remainingDelay);
93
+ }
94
+ if ((task.id != null || task.serial != null) && !task.managed.get()) {
95
+ /* keep task */
96
+ task.future = future;
97
+ TASKS.add(task);
98
+ }
99
+ }
100
+
101
+ /**
102
+ * Indicates whether a task with the specified <code>serial</code> has been
103
+ * submitted to the executor.
104
+ *
105
+ * @param serial the serial queue
106
+ * @return <code>true</code> if such a task has been submitted,
107
+ * <code>false</code> otherwise
108
+ */
109
+ private static boolean hasSerialRunning(String serial) {
110
+ for (Task task : TASKS) {
111
+ if (task.executionAsked && serial.equals(task.serial)) {
112
+ return true;
113
+ }
114
+ }
115
+ return false;
116
+ }
117
+
118
+ /**
119
+ * Retrieve and remove the first task having the specified
120
+ * <code>serial</code> (if any).
121
+ *
122
+ * @param serial the serial queue
123
+ * @return task if found, <code>null</code> otherwise
124
+ */
125
+ private static Task take(String serial) {
126
+ int len = TASKS.size();
127
+ for (int i = 0; i < len; i++) {
128
+ if (serial.equals(TASKS.get(i).serial)) {
129
+ return TASKS.remove(i);
130
+ }
131
+ }
132
+ return null;
133
+ }
134
+
135
+ /**
136
+ * Cancel all tasks having the specified <code>id</code>.
137
+ *
138
+ * @param id the cancellation identifier
139
+ * @param mayInterruptIfRunning <code>true</code> if the thread executing this task should be
140
+ * interrupted; otherwise, in-progress tasks are allowed to
141
+ * complete
142
+ */
143
+ public static synchronized void cancelAll(String id, boolean mayInterruptIfRunning) {
144
+ for (int i = TASKS.size() - 1; i >= 0; i--) {
145
+ Task task = TASKS.get(i);
146
+ if (id.equals(task.id)) {
147
+ if (task.future != null) {
148
+ task.future.cancel(mayInterruptIfRunning);
149
+ if (!task.managed.getAndSet(true)) {
150
+ /*
151
+ * the task has been submitted to the executor, but its
152
+ * execution has not started yet, so that its run()
153
+ * method will never call postExecute()
154
+ */
155
+ task.postExecute();
156
+ }
157
+ } else if (task.executionAsked) {
158
+ Log.w(TAG, "A task with id " + task.id + " cannot be cancelled (the executor set does not support it)");
159
+ } else {
160
+ /* this task has not been submitted to the executor */
161
+ TASKS.remove(i);
162
+ }
163
+ }
164
+ }
165
+ }
166
+
167
+ public static abstract class Task implements Runnable {
168
+
169
+ private String id;
170
+ private long remainingDelay;
171
+ private long targetTimeMillis; /* since epoch */
172
+ private String serial;
173
+ private boolean executionAsked;
174
+ private Future<?> future;
175
+
176
+ /*
177
+ * A task can be cancelled after it has been submitted to the executor
178
+ * but before its run() method is called. In that case, run() will never
179
+ * be called, hence neither will postExecute(): the tasks with the same
180
+ * serial identifier (if any) will never be submitted.
181
+ *
182
+ * Therefore, cancelAll() *must* call postExecute() if run() is not
183
+ * started.
184
+ *
185
+ * This flag guarantees that either cancelAll() or run() manages this
186
+ * task post execution, but not both.
187
+ */
188
+ private AtomicBoolean managed = new AtomicBoolean();
189
+
190
+ public Task(String id, long delay, String serial) {
191
+ if (!"".equals(id)) {
192
+ this.id = id;
193
+ }
194
+ if (delay > 0) {
195
+ remainingDelay = delay;
196
+ targetTimeMillis = System.currentTimeMillis() + delay;
197
+ }
198
+ if (!"".equals(serial)) {
199
+ this.serial = serial;
200
+ }
201
+ }
202
+
203
+ @Override
204
+ public void run() {
205
+ if (managed.getAndSet(true)) {
206
+ /* cancelled and postExecute() already called */
207
+ return;
208
+ }
209
+
210
+ try {
211
+ CURRENT_SERIAL.set(serial);
212
+ execute();
213
+ } finally {
214
+ /* handle next tasks */
215
+ postExecute();
216
+ }
217
+ }
218
+
219
+ public abstract void execute();
220
+
221
+ private void postExecute() {
222
+ if (id == null && serial == null) {
223
+ /* nothing to do */
224
+ return;
225
+ }
226
+ CURRENT_SERIAL.set(null);
227
+ synchronized (BackgroundExecutor.class) {
228
+ /* execution complete */
229
+ TASKS.remove(this);
230
+
231
+ if (serial != null) {
232
+ Task next = take(serial);
233
+ if (next != null) {
234
+ if (next.remainingDelay != 0) {
235
+ /* the delay may not have elapsed yet */
236
+ next.remainingDelay = Math.max(0L, targetTimeMillis - System.currentTimeMillis());
237
+ }
238
+ /* a task having the same serial was queued, execute it */
239
+ BackgroundExecutor.execute(next);
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }
245
+ }
246
+
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Copyright (C) 2010-2016 eBusiness Information, Excilys Group
3
+ * <p>
4
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5
+ * use this file except in compliance with the License. You may obtain a copy of
6
+ * the License at
7
+ * <p>
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ * <p>
10
+ * Unless required by applicable law or agreed To in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ * License for the specific language governing permissions and limitations under
14
+ * the License.
15
+ */
16
+ package com.shakebug.thread;
17
+
18
+ import android.os.Handler;
19
+ import android.os.Looper;
20
+ import android.os.Message;
21
+ import android.os.SystemClock;
22
+
23
+ import java.util.HashMap;
24
+ import java.util.Map;
25
+
26
+ /**
27
+ * This class provide operations for
28
+ * UiThread tasks.
29
+ */
30
+ public final class UiThreadExecutor {
31
+
32
+ private static final Handler HANDLER = new Handler(Looper.getMainLooper()) {
33
+ @Override
34
+ public void handleMessage(Message msg) {
35
+ Runnable callback = msg.getCallback();
36
+ if (callback != null) {
37
+ callback.run();
38
+ decrementToken((Token) msg.obj);
39
+ } else {
40
+ super.handleMessage(msg);
41
+ }
42
+ }
43
+ };
44
+
45
+ private static final Map<String, Token> TOKENS = new HashMap<>();
46
+
47
+ private UiThreadExecutor() {
48
+ // should not be instantiated
49
+ }
50
+
51
+ /**
52
+ * Store a new task in the map for providing cancellation. This method is
53
+ * used by AndroidAnnotations and not intended to be called by clients.
54
+ *
55
+ * @param id the identifier of the task
56
+ * @param task the task itself
57
+ * @param delay the delay or zero to run immediately
58
+ */
59
+ public static void runTask(String id, Runnable task, long delay) {
60
+ if ("".equals(id)) {
61
+ HANDLER.postDelayed(task, delay);
62
+ return;
63
+ }
64
+ long time = SystemClock.uptimeMillis() + delay;
65
+ HANDLER.postAtTime(task, nextToken(id), time);
66
+ }
67
+
68
+ private static Token nextToken(String id) {
69
+ synchronized (TOKENS) {
70
+ Token token = TOKENS.get(id);
71
+ if (token == null) {
72
+ token = new Token(id);
73
+ TOKENS.put(id, token);
74
+ }
75
+ token.runnablesCount++;
76
+ return token;
77
+ }
78
+ }
79
+
80
+ private static void decrementToken(Token token) {
81
+ synchronized (TOKENS) {
82
+ if (--token.runnablesCount == 0) {
83
+ String id = token.id;
84
+ Token old = TOKENS.remove(id);
85
+ if (old != token) {
86
+ // a runnable finished after cancelling, we just removed a
87
+ // wrong token, lets put it back
88
+ TOKENS.put(id, old);
89
+ }
90
+ }
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Cancel all tasks having the specified <code>id</code>.
96
+ *
97
+ * @param id the cancellation identifier
98
+ */
99
+ public static void cancelAll(String id) {
100
+ Token token;
101
+ synchronized (TOKENS) {
102
+ token = TOKENS.remove(id);
103
+ }
104
+ if (token == null) {
105
+ // nothing to cancel
106
+ return;
107
+ }
108
+ HANDLER.removeCallbacksAndMessages(token);
109
+ }
110
+
111
+ private static final class Token {
112
+ int runnablesCount = 0;
113
+ final String id;
114
+
115
+ private Token(String id) {
116
+ this.id = id;
117
+ }
118
+ }
119
+
120
+ }
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ package com.shakebug.types;
8
+
9
+ import android.net.NetworkInfo;
10
+ import android.telephony.TelephonyManager;
11
+ import javax.annotation.Nullable;
12
+
13
+ // Based on the EffectiveConnectionType enum described in the W3C Network Information API spec
14
+ // (https://wicg.github.io/netinfo/).
15
+ public enum CellularGeneration {
16
+ // We need to prefix these with "CG_" because they cannot start with numbers
17
+ CG_2G("2g"),
18
+ CG_3G("3g"),
19
+ CG_4G("4g"),
20
+ CG_5G("5g");
21
+
22
+ public final String label;
23
+
24
+ CellularGeneration(String label) {
25
+ this.label = label;
26
+ }
27
+
28
+ @Nullable
29
+ public static CellularGeneration fromNetworkInfo(@Nullable NetworkInfo networkInfo) {
30
+ if (networkInfo == null) {
31
+ return null;
32
+ }
33
+
34
+ switch (networkInfo.getSubtype()) {
35
+ case TelephonyManager.NETWORK_TYPE_1xRTT:
36
+ case TelephonyManager.NETWORK_TYPE_CDMA:
37
+ case TelephonyManager.NETWORK_TYPE_EDGE:
38
+ case TelephonyManager.NETWORK_TYPE_GPRS:
39
+ case TelephonyManager.NETWORK_TYPE_IDEN:
40
+ return CellularGeneration.CG_2G;
41
+ case TelephonyManager.NETWORK_TYPE_EHRPD:
42
+ case TelephonyManager.NETWORK_TYPE_EVDO_0:
43
+ case TelephonyManager.NETWORK_TYPE_EVDO_A:
44
+ case TelephonyManager.NETWORK_TYPE_EVDO_B:
45
+ case TelephonyManager.NETWORK_TYPE_HSDPA:
46
+ case TelephonyManager.NETWORK_TYPE_HSPA:
47
+ case TelephonyManager.NETWORK_TYPE_HSUPA:
48
+ case TelephonyManager.NETWORK_TYPE_UMTS:
49
+ return CellularGeneration.CG_3G;
50
+ case TelephonyManager.NETWORK_TYPE_HSPAP:
51
+ case TelephonyManager.NETWORK_TYPE_LTE:
52
+ return CellularGeneration.CG_4G;
53
+ case TelephonyManager.NETWORK_TYPE_NR:
54
+ return CellularGeneration.CG_5G;
55
+ case TelephonyManager.NETWORK_TYPE_UNKNOWN:
56
+ default:
57
+ return null;
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ package com.shakebug.types;
8
+
9
+ // Based on the ConnectionType enum described in the W3C Network Information API spec
10
+ // (https://wicg.github.io/netinfo/).
11
+ public enum ConnectionType {
12
+ BLUETOOTH("bluetooth"),
13
+ CELLULAR("cellular"),
14
+ ETHERNET("ethernet"),
15
+ NONE("none"),
16
+ UNKNOWN("unknown"),
17
+ WIFI("wifi"),
18
+ WIMAX("wimax"),
19
+ VPN("vpn");
20
+
21
+ public final String label;
22
+
23
+ ConnectionType(String label) {
24
+ this.label = label;
25
+ }
26
+ }