├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── ReactNativeScreenTimeAPI.podspec ├── ScreenTimeExample ├── .gitignore ├── .watchmanconfig ├── App.tsx ├── Gemfile ├── README.md ├── __tests__ │ └── App.test.tsx ├── android │ ├── app │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── screentime │ │ │ │ ├── MainActivity.kt │ │ │ │ └── MainApplication.kt │ │ │ └── res │ │ │ ├── drawable │ │ │ └── rn_edit_text_material.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── app.json ├── babel.config.js ├── eslint.config.mjs ├── index.js ├── ios │ ├── .xcode.env │ ├── AppDelegate.swift │ ├── Podfile │ ├── Podfile.lock │ ├── ScreenTimeExample-Bridging-Header.h │ ├── ScreenTimeExample.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── ScreenTimeExample.xcscheme │ ├── ScreenTimeExample.xcworkspace │ │ └── contents.xcworkspacedata │ ├── ScreenTimeExample │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ ├── PrivacyInfo.xcprivacy │ │ └── ScreenTimeExample.entitlements │ └── ScreenTimeExampleTests │ │ ├── Info.plist │ │ └── ScreenTimeExampleTests.m ├── jest.config.js ├── metro.config.js ├── package.json ├── tsconfig.json └── yarn.lock ├── android ├── README.md ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── noodleofdeath │ │ └── screentimeapi │ │ ├── AdminActivity.java │ │ ├── DeviceAdmin.java │ │ ├── ScreenTimeAPIModule.java │ │ └── ScreenTimeApiPackage.java │ └── res │ ├── drawable-v24 │ └── ic_launcher_foreground.xml │ ├── drawable │ ├── app_background.xml │ ├── button_cancel.xml │ ├── button_ok.xml │ ├── dialog_fragment_round_icon_background.xml │ ├── edit_text_rounded.xml │ ├── ic_apps.xml │ ├── ic_arrow_back.xml │ ├── ic_call.xml │ ├── ic_call_made.xml │ ├── ic_call_received.xml │ ├── ic_cancel.xml │ ├── ic_check.xml │ ├── ic_children.xml │ ├── ic_cloud_done.xml │ ├── ic_delete.xml │ ├── ic_delete_white.xml │ ├── ic_dot.xml │ ├── ic_dot_selected.xml │ ├── ic_error.xml │ ├── ic_face.xml │ ├── ic_geo_fence.xml │ ├── ic_geofence.xml │ ├── ic_home_.xml │ ├── ic_info.xml │ ├── ic_kidsafe.xml │ ├── ic_language.xml │ ├── ic_launcher_about.png │ ├── ic_launcher_foreground.xml │ ├── ic_location.xml │ ├── ic_location_child.xml │ ├── ic_lock.xml │ ├── ic_lock_white.xml │ ├── ic_mail.xml │ ├── ic_message.xml │ ├── ic_parents.xml │ ├── ic_permissions_calls.xml │ ├── ic_permissions_location.xml │ ├── ic_permissions_main.xml │ ├── ic_permissions_messages.xml │ ├── ic_permissions_settings.xml │ ├── ic_person.xml │ ├── ic_profile_image.xml │ ├── ic_reset.xml │ ├── ic_settings.xml │ ├── ic_stats.xml │ └── ic_verified_user.xml │ ├── font │ ├── open_sans_bold.ttf │ ├── open_sans_extra_bold.ttf │ └── open_sans_regular.ttf │ ├── layout │ ├── activity_about.xml │ ├── activity_account_verification.xml │ ├── activity_blocked_app.xml │ ├── activity_child_details.xml │ ├── activity_child_signed_in.xml │ ├── activity_login.xml │ ├── activity_mode_selection.xml │ ├── activity_parent_signed_in.xml │ ├── activity_permissions.xml │ ├── activity_settings.xml │ ├── activity_sign_up.xml │ ├── card_app.xml │ ├── card_call.xml │ ├── card_child.xml │ ├── card_contact.xml │ ├── card_message.xml │ ├── fragment_activity_log.xml │ ├── fragment_apps.xml │ ├── fragment_calls.xml │ ├── fragment_contacts.xml │ ├── fragment_dialog_change_password.xml │ ├── fragment_dialog_confirmation.xml │ ├── fragment_dialog_delete_account.xml │ ├── fragment_dialog_geo_fence.xml │ ├── fragment_dialog_google_child_sign_up.xml │ ├── fragment_dialog_information.xml │ ├── fragment_dialog_language_selection.xml │ ├── fragment_dialog_loading.xml │ ├── fragment_dialog_lock.xml │ ├── fragment_dialog_lock_app.xml │ ├── fragment_dialog_password_validation.xml │ ├── fragment_dialog_permission_explanation.xml │ ├── fragment_dialog_recover_password.xml │ ├── fragment_location.xml │ ├── fragment_messages.xml │ ├── fragment_permissions_location.xml │ ├── fragment_permissions_main.xml │ ├── fragment_permissions_phone_calls.xml │ ├── fragment_permissions_settings.xml │ ├── fragment_permissions_sms.xml │ ├── horizontal_line.xml │ └── toolbar.xml │ ├── menu │ └── bottom_navigation_items.xml │ ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-mdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── values-ar │ └── strings.xml │ ├── values │ ├── arrays.xml │ ├── colors.xml │ ├── dimens.xml │ ├── ic_launcher_background.xml │ ├── strings.xml │ └── styles.xml │ └── xml │ └── device_admin_policies.xml ├── index.d.ts ├── index.js ├── ios ├── ReactNativeScreenTimeAPI.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── ReactNativeScreenTimeAPI │ ├── Encodable.swift │ ├── Extensions.swift │ ├── OCR.swift │ ├── ReactNativeScreenTimeAPI-Bridging-Header.h │ ├── ReactNativeScreenTimeAPI.h │ ├── ReactNativeScreenTimeAPI.m │ └── ReactNativeScreenTimeAPI.swift ├── package.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | xcuserdata/ 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .github/ 2 | example/ 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 NoodleOfDeath 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ReactNativeScreenTimeAPI.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "ReactNativeScreenTimeAPI" 3 | s.version = "0.0.1-prelease" 4 | s.summary = "React Native Screen Time API for Android and iOS" 5 | 6 | s.homepage = "https://github.com/noodleofdeath/react-native-screen-time-api" 7 | 8 | s.license = "MIT" 9 | s.authors = "Thom Morgan" 10 | s.platform = :ios, "16.0" 11 | 12 | s.source = { :git => "https://github.com/noodleofdeath/react-native-screen-time-api.git" } 13 | 14 | s.source_files = "ios/ReactNativeScreenTimeAPI/*.{h,m,swift}" 15 | 16 | s.dependency 'React-Core' 17 | end 18 | -------------------------------------------------------------------------------- /ScreenTimeExample/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | **/.xcode.env.local 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | *.hprof 33 | .cxx/ 34 | *.keystore 35 | !debug.keystore 36 | 37 | # node.js 38 | # 39 | node_modules/ 40 | npm-debug.log 41 | yarn-error.log 42 | 43 | # fastlane 44 | # 45 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 46 | # screenshots whenever they are needed. 47 | # For more information about the recommended setup visit: 48 | # https://docs.fastlane.tools/best-practices/source-control/ 49 | 50 | **/fastlane/report.xml 51 | **/fastlane/Preview.html 52 | **/fastlane/screenshots 53 | **/fastlane/test_output 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # Ruby / CocoaPods 59 | **/Pods/ 60 | /vendor/bundle/ 61 | 62 | # Temporary files created by Metro to check the health of the file watcher 63 | .metro-health-check* 64 | 65 | # testing 66 | /coverage 67 | 68 | # Yarn 69 | .yarn/* 70 | !.yarn/patches 71 | !.yarn/plugins 72 | !.yarn/releases 73 | !.yarn/sdks 74 | !.yarn/versions 75 | -------------------------------------------------------------------------------- /ScreenTimeExample/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /ScreenTimeExample/App.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | StyleSheet, 4 | Text, 5 | TouchableHighlight, 6 | View, 7 | } from 'react-native'; 8 | 9 | import { FamilyActivitySelection, ScreenTime } from 'react-native-screen-time-api'; 10 | 11 | const MyApp = () => { 12 | 13 | const [activitySelection, setActivitySelection] = React.useState(); 14 | 15 | const selectActivities = React.useCallback(async () => { 16 | try { 17 | await ScreenTime.requestAuthorization('individual'); 18 | const status = await ScreenTime.getAuthorizationStatus(); 19 | console.log('Authorization status:', status); // 'approved', 'denied', or 'notDetermined' 20 | if (status !== 'approved') { 21 | throw new Error('user denied screen time access'); 22 | } 23 | const selection = await ScreenTime.displayFamilyActivityPicker({}); 24 | console.log('Family activity selection:', selection); 25 | // selection will be `null` if user presses cancel 26 | if (selection) { 27 | setActivitySelection(selection); 28 | await ScreenTime.setActivitySelection(selection); // sets the shields 29 | } 30 | } catch (error) { 31 | console.error(error); 32 | } 33 | }, []); 34 | 35 | const getNames = React.useCallback(async () => { 36 | try { 37 | 38 | if (!activitySelection) { 39 | throw new Error('no activity selection'); 40 | } 41 | 42 | const applicationNames = await ScreenTime.getApplicationNames(activitySelection.applicationTokens); 43 | console.log('Applications:', applicationNames); 44 | 45 | const categoryNames = await ScreenTime.getCategoryNames(activitySelection.categoryTokens); 46 | console.log('Categories:', categoryNames); 47 | 48 | } catch (error) { 49 | console.error(error); 50 | } 51 | }, [activitySelection]); 52 | 53 | return ( 54 | 55 | selectActivities() }> 56 | Select Activities 57 | 58 | {activitySelection && ( 59 | getNames() }> 60 | Get Names 61 | 62 | )} 63 | 64 | ); 65 | }; 66 | 67 | const styles = StyleSheet.create({ 68 | view: { 69 | alignItems: 'center', 70 | flexDirection: 'column', 71 | flexGrow: 1, 72 | backgroundColor: 'white', 73 | gap: 6, 74 | justifyContent: 'center', 75 | }, 76 | }); 77 | 78 | export default MyApp; -------------------------------------------------------------------------------- /ScreenTimeExample/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby ">= 2.6.10" 5 | 6 | # Exclude problematic versions of cocoapods and activesupport that causes build failures. 7 | gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' 8 | gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' 9 | gem 'xcodeproj', '< 1.26.0' 10 | -------------------------------------------------------------------------------- /ScreenTimeExample/README.md: -------------------------------------------------------------------------------- 1 | This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli). 2 | 3 | # Getting Started 4 | 5 | >**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. 6 | 7 | ## Step 1: Start the Metro Server 8 | 9 | First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native. 10 | 11 | To start Metro, run the following command from the _root_ of your React Native project: 12 | 13 | ```bash 14 | # using npm 15 | npm start 16 | 17 | # OR using Yarn 18 | yarn start 19 | ``` 20 | 21 | ## Step 2: Start your Application 22 | 23 | Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app: 24 | 25 | ### For Android 26 | 27 | ```bash 28 | # using npm 29 | npm run android 30 | 31 | # OR using Yarn 32 | yarn android 33 | ``` 34 | 35 | ### For iOS 36 | 37 | ```bash 38 | # using npm 39 | npm run ios 40 | 41 | # OR using Yarn 42 | yarn ios 43 | ``` 44 | 45 | If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly. 46 | 47 | This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively. 48 | 49 | ## Step 3: Modifying your App 50 | 51 | Now that you have successfully run the app, let's modify it. 52 | 53 | 1. Open `App.tsx` in your text editor of choice and edit some lines. 54 | 2. For **Android**: Press the R key twice or select **"Reload"** from the **Developer Menu** (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes! 55 | 56 | For **iOS**: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes! 57 | 58 | ## Congratulations! :tada: 59 | 60 | You've successfully run and modified your React Native App. :partying_face: 61 | 62 | ### Now what? 63 | 64 | - If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps). 65 | - If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started). 66 | 67 | # Troubleshooting 68 | 69 | If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page. 70 | 71 | # Learn More 72 | 73 | To learn more about React Native, take a look at the following resources: 74 | 75 | - [React Native Website](https://reactnative.dev) - learn more about React Native. 76 | - [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment. 77 | - [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**. 78 | - [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts. 79 | - [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native. 80 | -------------------------------------------------------------------------------- /ScreenTimeExample/__tests__/App.test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: import explicitly to use the types shipped with jest. 10 | import {it} from '@jest/globals'; 11 | 12 | // Note: test renderer must be required after react-native. 13 | import renderer from 'react-test-renderer'; 14 | 15 | it('renders correctly', () => { 16 | renderer.create(); 17 | }); 18 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | apply plugin: "org.jetbrains.kotlin.android" 3 | apply plugin: "com.facebook.react" 4 | 5 | /** 6 | * This is the configuration block to customize your React Native Android app. 7 | * By default you don't need to apply any configuration, just uncomment the lines you need. 8 | */ 9 | react { 10 | /* Folders */ 11 | // The root of your project, i.e. where "package.json" lives. Default is '../..' 12 | // root = file("../../") 13 | // The folder where the react-native NPM package is. Default is ../../node_modules/react-native 14 | // reactNativeDir = file("../../node_modules/react-native") 15 | // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen 16 | // codegenDir = file("../../node_modules/@react-native/codegen") 17 | // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js 18 | // cliFile = file("../../node_modules/react-native/cli.js") 19 | 20 | /* Variants */ 21 | // The list of variants to that are debuggable. For those we're going to 22 | // skip the bundling of the JS bundle and the assets. By default is just 'debug'. 23 | // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. 24 | // debuggableVariants = ["liteDebug", "prodDebug"] 25 | 26 | /* Bundling */ 27 | // A list containing the node command and its flags. Default is just 'node'. 28 | // nodeExecutableAndArgs = ["node"] 29 | // 30 | // The command to run when bundling. By default is 'bundle' 31 | // bundleCommand = "ram-bundle" 32 | // 33 | // The path to the CLI configuration file. Default is empty. 34 | // bundleConfig = file(../rn-cli.config.js) 35 | // 36 | // The name of the generated asset file containing your JS bundle 37 | // bundleAssetName = "MyApplication.android.bundle" 38 | // 39 | // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' 40 | // entryFile = file("../js/MyApplication.android.js") 41 | // 42 | // A list of extra flags to pass to the 'bundle' commands. 43 | // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle 44 | // extraPackagerArgs = [] 45 | 46 | /* Hermes Commands */ 47 | // The hermes compiler command to run. By default it is 'hermesc' 48 | // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" 49 | // 50 | // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" 51 | // hermesFlags = ["-O", "-output-source-map"] 52 | 53 | /* Autolinking */ 54 | autolinkLibrariesWithApp() 55 | } 56 | 57 | /** 58 | * Set this to true to Run Proguard on Release builds to minify the Java bytecode. 59 | */ 60 | def enableProguardInReleaseBuilds = false 61 | 62 | /** 63 | * The preferred build flavor of JavaScriptCore (JSC) 64 | * 65 | * For example, to use the international variant, you can use: 66 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 67 | * 68 | * The international variant includes ICU i18n library and necessary data 69 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 70 | * give correct results when using with locales other than en-US. Note that 71 | * this variant is about 6MiB larger per architecture than default. 72 | */ 73 | def jscFlavor = 'org.webkit:android-jsc:+' 74 | 75 | android { 76 | ndkVersion rootProject.ext.ndkVersion 77 | buildToolsVersion rootProject.ext.buildToolsVersion 78 | compileSdk rootProject.ext.compileSdkVersion 79 | 80 | namespace "com.example.screentime" 81 | defaultConfig { 82 | applicationId "com.example.screentime" 83 | minSdkVersion rootProject.ext.minSdkVersion 84 | targetSdkVersion rootProject.ext.targetSdkVersion 85 | versionCode 1 86 | versionName "1.0" 87 | } 88 | signingConfigs { 89 | debug { 90 | storeFile file('debug.keystore') 91 | storePassword 'android' 92 | keyAlias 'androiddebugkey' 93 | keyPassword 'android' 94 | } 95 | } 96 | buildTypes { 97 | debug { 98 | signingConfig signingConfigs.debug 99 | } 100 | release { 101 | // Caution! In production, you need to generate your own keystore file. 102 | // see https://reactnative.dev/docs/signed-apk-android. 103 | signingConfig signingConfigs.debug 104 | minifyEnabled enableProguardInReleaseBuilds 105 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 106 | } 107 | } 108 | } 109 | 110 | dependencies { 111 | // The version of react-native is set by the React Native Gradle Plugin 112 | implementation("com.facebook.react:react-android") 113 | 114 | if (hermesEnabled.toBoolean()) { 115 | implementation("com.facebook.react:hermes-android") 116 | } else { 117 | implementation jscFlavor 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/ScreenTimeExample/android/app/debug.keystore -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/java/com/example/screentime/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.screentime 2 | 3 | import com.facebook.react.ReactActivity 4 | import com.facebook.react.ReactActivityDelegate 5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled 6 | import com.facebook.react.defaults.DefaultReactActivityDelegate 7 | 8 | class MainActivity : ReactActivity() { 9 | 10 | /** 11 | * Returns the name of the main component registered from JavaScript. This is used to schedule 12 | * rendering of the component. 13 | */ 14 | override fun getMainComponentName(): String = "ScreenTimeExample" 15 | 16 | /** 17 | * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] 18 | * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] 19 | */ 20 | override fun createReactActivityDelegate(): ReactActivityDelegate = 21 | DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) 22 | } 23 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/java/com/example/screentime/MainApplication.kt: -------------------------------------------------------------------------------- 1 | package com.example.screentime 2 | 3 | import android.app.Application 4 | import com.facebook.react.PackageList 5 | import com.facebook.react.ReactApplication 6 | import com.facebook.react.ReactHost 7 | import com.facebook.react.ReactNativeHost 8 | import com.facebook.react.ReactPackage 9 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load 10 | import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost 11 | import com.facebook.react.defaults.DefaultReactNativeHost 12 | import com.facebook.react.soloader.OpenSourceMergedSoMapping 13 | import com.facebook.soloader.SoLoader 14 | 15 | class MainApplication : Application(), ReactApplication { 16 | 17 | override val reactNativeHost: ReactNativeHost = 18 | object : DefaultReactNativeHost(this) { 19 | override fun getPackages(): List = 20 | PackageList(this).packages.apply { 21 | // Packages that cannot be autolinked yet can be added manually here, for example: 22 | // add(MyReactNativePackage()) 23 | } 24 | 25 | override fun getJSMainModuleName(): String = "index" 26 | 27 | override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG 28 | 29 | override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED 30 | override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED 31 | } 32 | 33 | override val reactHost: ReactHost 34 | get() = getDefaultReactHost(applicationContext, reactNativeHost) 35 | 36 | override fun onCreate() { 37 | super.onCreate() 38 | SoLoader.init(this, OpenSourceMergedSoMapping) 39 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { 40 | // If you opted-in for the New Architecture, we load the native entry point for this app. 41 | load() 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 22 | 23 | 24 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/ScreenTimeExample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/ScreenTimeExample/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/ScreenTimeExample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/ScreenTimeExample/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/ScreenTimeExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/ScreenTimeExample/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/ScreenTimeExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/ScreenTimeExample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/ScreenTimeExample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/ScreenTimeExample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ScreenTimeExample 3 | 4 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | buildToolsVersion = "35.0.0" 4 | minSdkVersion = 24 5 | compileSdkVersion = 35 6 | targetSdkVersion = 34 7 | ndkVersion = "26.1.10909125" 8 | kotlinVersion = "1.9.24" 9 | } 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle") 16 | classpath("com.facebook.react:react-native-gradle-plugin") 17 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") 18 | } 19 | } 20 | 21 | apply plugin: "com.facebook.react.rootproject" 22 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | 25 | # Use this property to specify which architecture you want to build. 26 | # You can also override it from the CLI using 27 | # ./gradlew -PreactNativeArchitectures=x86_64 28 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 29 | 30 | # Use this property to enable support to the new architecture. 31 | # This will allow you to use TurboModules and the Fabric render in 32 | # your application. You should enable this flag either if you want 33 | # to write custom TurboModules/Fabric components OR use libraries that 34 | # are providing them. 35 | newArchEnabled=true 36 | 37 | # Use this property to enable or disable the Hermes JS engine. 38 | # If set to false, you will be using JSC instead. 39 | hermesEnabled=true 40 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/ScreenTimeExample/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ScreenTimeExample/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /ScreenTimeExample/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") } 2 | plugins { id("com.facebook.react.settings") } 3 | extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } 4 | rootProject.name = 'com.example.screentime' 5 | include ':app' 6 | includeBuild('../node_modules/@react-native/gradle-plugin') 7 | -------------------------------------------------------------------------------- /ScreenTimeExample/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ScreenTimeExample", 3 | "displayName": "ScreenTimeExample" 4 | } 5 | -------------------------------------------------------------------------------- /ScreenTimeExample/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:@react-native/babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /ScreenTimeExample/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | export default [{ 2 | ignores: [ 3 | '**/Template*.ts*', 4 | '**/*.xcframework', 5 | ], 6 | }]; -------------------------------------------------------------------------------- /ScreenTimeExample/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // DrunkMode 4 | // 5 | // Created by thom on 4/13/24. 6 | // 7 | 8 | import Foundation 9 | import UserNotifications 10 | 11 | @UIApplicationMain 12 | class AppDelegate: RCTAppDelegate, UNUserNotificationCenterDelegate { 13 | 14 | public override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 15 | self.moduleName = "ScreenTimeExample"; 16 | // You can add your custom initial props in the dictionary below. 17 | // They will be passed down to the ViewController used by React Native. 18 | self.initialProps = [:] 19 | return super.application(application, didFinishLaunchingWithOptions: launchOptions); 20 | } 21 | 22 | @objc(bundleURL) 23 | public override func bundleURL() -> URL? { 24 | #if DEBUG 25 | RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") 26 | #else 27 | Bundle.main.url(forResource: "main", withExtension: "jsbundle") 28 | #endif 29 | } 30 | 31 | @objc(sourceURLForBridge:) 32 | public func sourceURLForBridge(_ bridge: RCTBridge) -> URL? { 33 | bundleURL() 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Resolve react_native_pods.rb with node to allow for hoisting 2 | require Pod::Executable.execute_command('node', ['-p', 3 | 'require.resolve( 4 | "react-native/scripts/react_native_pods.rb", 5 | {paths: [process.argv[1]]}, 6 | )', __dir__]).strip 7 | 8 | platform :ios, '16.0' 9 | prepare_react_native_project! 10 | 11 | linkage = ENV['USE_FRAMEWORKS'] 12 | if linkage != nil 13 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green 14 | use_frameworks! :linkage => linkage.to_sym 15 | end 16 | 17 | target 'ScreenTimeExample' do 18 | config = use_native_modules! 19 | 20 | use_react_native!( 21 | :path => config[:reactNativePath], 22 | # An absolute path to your application root. 23 | :app_path => "#{Pod::Config.instance.installation_root}/.." 24 | ) 25 | 26 | target 'ScreenTimeExampleTests' do 27 | inherit! :complete 28 | # Pods for testing 29 | end 30 | 31 | post_install do |installer| 32 | # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 33 | react_native_post_install( 34 | installer, 35 | config[:reactNativePath], 36 | :mac_catalyst_enabled => false, 37 | # :ccache_enabled => true 38 | ) 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/ScreenTimeExample-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import 6 | #import 7 | 8 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/ScreenTimeExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/ScreenTimeExample.xcodeproj/xcshareddata/xcschemes/ScreenTimeExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/ScreenTimeExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/ScreenTimeExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/ScreenTimeExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/ScreenTimeExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ScreenTimeExample 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(CURRENT_PROJECT_VERSION) 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | 30 | NSAllowsArbitraryLoads 31 | 32 | NSAllowsLocalNetworking 33 | 34 | 35 | NSLocationWhenInUseUsageDescription 36 | 37 | UILaunchStoryboardName 38 | LaunchScreen 39 | UIRequiredDeviceCapabilities 40 | 41 | arm64 42 | 43 | UISupportedInterfaceOrientations 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | UIViewControllerBasedStatusBarAppearance 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/ScreenTimeExample/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/ScreenTimeExample/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyAccessedAPITypes 6 | 7 | 8 | NSPrivacyAccessedAPIType 9 | NSPrivacyAccessedAPICategoryFileTimestamp 10 | NSPrivacyAccessedAPITypeReasons 11 | 12 | C617.1 13 | 14 | 15 | 16 | NSPrivacyAccessedAPIType 17 | NSPrivacyAccessedAPICategoryUserDefaults 18 | NSPrivacyAccessedAPITypeReasons 19 | 20 | CA92.1 21 | 22 | 23 | 24 | NSPrivacyAccessedAPIType 25 | NSPrivacyAccessedAPICategorySystemBootTime 26 | NSPrivacyAccessedAPITypeReasons 27 | 28 | 35F9.1 29 | 30 | 31 | 32 | NSPrivacyCollectedDataTypes 33 | 34 | NSPrivacyTracking 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/ScreenTimeExample/ScreenTimeExample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.family-controls 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/ScreenTimeExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ScreenTimeExample/ios/ScreenTimeExampleTests/ScreenTimeExampleTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface ScreenTimeExampleTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation ScreenTimeExampleTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction( 38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 39 | if (level >= RCTLogLevelError) { 40 | redboxError = message; 41 | } 42 | }); 43 | #endif 44 | 45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 48 | 49 | foundElement = [self findSubviewInView:vc.view 50 | matching:^BOOL(UIView *view) { 51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 52 | return YES; 53 | } 54 | return NO; 55 | }]; 56 | } 57 | 58 | #ifdef DEBUG 59 | RCTSetLogFunction(RCTDefaultLogFunction); 60 | #endif 61 | 62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /ScreenTimeExample/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'react-native', 3 | }; 4 | -------------------------------------------------------------------------------- /ScreenTimeExample/metro.config.js: -------------------------------------------------------------------------------- 1 | const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); 2 | 3 | /** 4 | * Metro configuration 5 | * https://reactnative.dev/docs/metro 6 | * 7 | * @type {import('metro-config').MetroConfig} 8 | */ 9 | const config = {}; 10 | 11 | module.exports = mergeConfig(getDefaultConfig(__dirname), config); 12 | -------------------------------------------------------------------------------- /ScreenTimeExample/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.example.screentime", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "lint": "eslint .", 9 | "format": "eslint . --fix", 10 | "start": "react-native start", 11 | "test": "jest" 12 | }, 13 | "dependencies": { 14 | "react": "18.3.1", 15 | "react-native": "0.76.6", 16 | "react-native-screen-time-api": "../" 17 | }, 18 | "devDependencies": { 19 | "@babel/core": "^7.25.2", 20 | "@babel/preset-env": "^7.25.3", 21 | "@babel/runtime": "^7.25.0", 22 | "@react-native-community/cli": "15.0.1", 23 | "@react-native-community/cli-platform-android": "15.0.1", 24 | "@react-native-community/cli-platform-ios": "15.0.1", 25 | "@react-native/babel-preset": "0.76.6", 26 | "@react-native/eslint-config": "0.76.6", 27 | "@react-native/metro-config": "0.76.6", 28 | "@react-native/typescript-config": "0.76.6", 29 | "@types/react": "^18.2.6", 30 | "@types/react-test-renderer": "^18.0.0", 31 | "babel-jest": "^29.6.3", 32 | "eslint": "^8.19.0", 33 | "jest": "^29.6.3", 34 | "prettier": "2.8.8", 35 | "react-test-renderer": "18.3.1", 36 | "typescript": "5.0.4" 37 | }, 38 | "engines": { 39 | "node": ">=18" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ScreenTimeExample/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@react-native/typescript-config/tsconfig.json", 3 | "compilerOptions": { 4 | "forceConsistentCasingInFileNames": false, 5 | "jsx": "react-jsx", 6 | "lib": [ 7 | "esnext", 8 | "dom", 9 | "dom.iterable" 10 | ], 11 | "allowJs": false, 12 | "esModuleInterop": true, 13 | "baseUrl": ".", 14 | }, 15 | "include": [ 16 | "index.js", 17 | "src/**/*.ts", 18 | "src/**/*.tsx", 19 | ], 20 | "exclude": [ 21 | "node_modules", 22 | "metro.config.js", 23 | "jest.config.js", 24 | "react-native.config.js", 25 | "ios" 26 | ], 27 | } -------------------------------------------------------------------------------- /android/README.md: -------------------------------------------------------------------------------- 1 | # Android (Not currently supported) -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | def safeExtGet(prop, fallback) { 2 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback 3 | } 4 | 5 | buildscript { 6 | repositories { 7 | google() 8 | mavenCentral() 9 | } 10 | 11 | dependencies { 12 | classpath 'com.android.tools.build:gradle:8.3.1' 13 | classpath 'com.google.gms:google-services:4.4.1' 14 | } 15 | } 16 | 17 | apply plugin: 'com.android.library' 18 | apply plugin: 'com.google.gms.google-services' 19 | 20 | android { 21 | compileSdkVersion safeExtGet('compileSdkVersion', 26) 22 | buildToolsVersion safeExtGet('buildToolsVersion', '26.0.3') 23 | 24 | defaultConfig { 25 | minSdkVersion safeExtGet('minSdkVersion', 16) 26 | targetSdkVersion safeExtGet('targetSdkVersion', 26) 27 | versionCode 1 28 | versionName "1.0" 29 | } 30 | } 31 | 32 | repositories { 33 | google() 34 | mavenCentral() 35 | } 36 | 37 | dependencies { 38 | implementation 'com.facebook.react:react-native:0.20.1' 39 | implementation fileTree(include: ['*.jar'], dir: 'libs') 40 | implementation 'androidx.appcompat:appcompat:1.6.1' 41 | implementation 'com.google.android.material:material:1.11.0' 42 | implementation 'androidx.recyclerview:recyclerview:1.3.2' 43 | implementation 'androidx.cardview:cardview:1.0.0' 44 | implementation 'com.google.firebase:firebase-auth:22.3.1' 45 | implementation 'com.google.firebase:firebase-database:20.3.1' 46 | implementation 'com.google.firebase:firebase-core:21.1.1' 47 | implementation 'org.osmdroid:osmdroid-android:6.1.0' 48 | implementation 'com.squareup.picasso:picasso:2.71828' 49 | implementation 'com.google.android.gms:play-services-auth:21.0.0' 50 | implementation 'de.hdodenhof:circleimageview:3.0.0' 51 | implementation 'com.google.firebase:firebase-storage:20.3.0' 52 | testImplementation 'junit:junit:4.13.2' 53 | androidTestImplementation 'androidx.test:runner:1.5.2' 54 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' 55 | } -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /android/src/main/java/com/noodleofdeath/screentimeapi/AdminActivity.java: -------------------------------------------------------------------------------- 1 | package com.noodleofdeath.screentimeapi; 2 | 3 | import android.app.Activity; 4 | import android.app.admin.DevicePolicyManager; 5 | import android.content.ComponentName; 6 | import android.content.Context; 7 | import android.content.Intent; 8 | 9 | public class AdminActivity extends Activity { 10 | 11 | private static final int REQUEST_CODE_ENABLE_ADMIN = 1; 12 | 13 | public void enableDeviceAdmin() { 14 | ComponentName deviceAdminSample = new ComponentName(this, DeviceAdmin.class); 15 | Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN); 16 | intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, deviceAdminSample); 17 | intent.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION, "Provide these permissions to manage the application"); 18 | startActivityForResult(intent, REQUEST_CODE_ENABLE_ADMIN); 19 | } 20 | 21 | public void disableDeviceAdmin() { 22 | DevicePolicyManager mDPM = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE); 23 | ComponentName deviceAdminSample = new ComponentName(this, DeviceAdmin.class); 24 | mDPM.removeActiveAdmin(deviceAdminSample); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /android/src/main/java/com/noodleofdeath/screentimeapi/DeviceAdmin.java: -------------------------------------------------------------------------------- 1 | package com.noodleofdeath.screentimeapi; 2 | 3 | import android.app.admin.DeviceAdminReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | 7 | import androidx.core.app.ShareCompat; 8 | 9 | public class DeviceAdmin extends DeviceAdminReceiver { 10 | 11 | @Override 12 | public void onEnabled(@androidx.annotation.NonNull Context context, @androidx.annotation.NonNull Intent intent) { 13 | super.onEnabled(context, intent); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /android/src/main/java/com/noodleofdeath/screentimeapi/ScreenTimeAPIModule.java: -------------------------------------------------------------------------------- 1 | package com.noodleofdeath.screentimeapi; 2 | 3 | import android.app.Activity; 4 | 5 | import androidx.annotation.NonNull; 6 | 7 | import com.facebook.react.bridge.Arguments; 8 | import com.facebook.react.bridge.Promise; 9 | import com.facebook.react.bridge.ReactApplicationContext; 10 | import com.facebook.react.bridge.ReactContextBaseJavaModule; 11 | import com.facebook.react.bridge.ReactMethod; 12 | import com.facebook.react.bridge.ReadableArray; 13 | import com.facebook.react.bridge.WritableArray; 14 | 15 | public class ScreenTimeAPIModule extends ReactContextBaseJavaModule { 16 | 17 | private static final int REQUEST_CODE_ENABLE_ADMIN = 1; 18 | 19 | public ScreenTimeAPIModule(ReactApplicationContext reactContext) { 20 | super(reactContext); 21 | } 22 | 23 | @NonNull 24 | @Override 25 | public String getName() { 26 | return "ScreenTimeAPI"; 27 | } 28 | 29 | @ReactMethod 30 | public void requestAuthorization(String type, Promise promise) { 31 | AdminActivity activity = new AdminActivity(); 32 | activity.enableDeviceAdmin(); 33 | promise.resolve("approved"); 34 | } 35 | 36 | @ReactMethod 37 | public void revokeAuthorization(Promise promise) { 38 | AdminActivity activity = new AdminActivity(); 39 | activity.disableDeviceAdmin(); 40 | promise.resolve("notDetermined"); 41 | } 42 | 43 | @ReactMethod 44 | public void getBlockedApplications(Promise promise) { 45 | WritableArray apps = Arguments.createArray(); 46 | promise.resolve(apps); 47 | } 48 | 49 | @ReactMethod 50 | public void setBlockedApplications(ReadableArray apps, Promise promise) { 51 | promise.resolve("success"); 52 | } 53 | 54 | @ReactMethod 55 | public void clearBlockedApplications(Promise promise) { 56 | promise.resolve("success"); 57 | } 58 | 59 | @ReactMethod 60 | public void denyAppRemoval(Promise promise) { 61 | promise.resolve("success"); 62 | } 63 | 64 | @ReactMethod 65 | public void allowAppRemoval(Promise promise) { 66 | promise.resolve("success"); 67 | } 68 | 69 | @ReactMethod 70 | public void denyAppInstallation(Promise promise) { 71 | promise.resolve("success"); 72 | } 73 | 74 | @ReactMethod 75 | public void allowAppInstallation(Promise promise) { 76 | promise.resolve("success"); 77 | } 78 | 79 | } -------------------------------------------------------------------------------- /android/src/main/java/com/noodleofdeath/screentimeapi/ScreenTimeApiPackage.java: -------------------------------------------------------------------------------- 1 | package com.noodleofdeath.screentimeapi; 2 | 3 | import androidx.annotation.NonNull; 4 | 5 | import com.facebook.react.ReactPackage; 6 | import com.facebook.react.bridge.JavaScriptModule; 7 | import com.facebook.react.bridge.NativeModule; 8 | import com.facebook.react.bridge.ReactApplicationContext; 9 | import com.facebook.react.uimanager.ViewManager; 10 | 11 | import java.util.ArrayList; 12 | import java.util.Collections; 13 | import java.util.List; 14 | 15 | public class ScreenTimeAPIPackage implements ReactPackage { 16 | 17 | @NonNull 18 | @Override 19 | public List createNativeModules(@NonNull ReactApplicationContext reactContext) { 20 | List modules = new ArrayList<>(); 21 | modules.add(new ScreenTimeAPIModule(reactContext)); 22 | return modules; 23 | } 24 | 25 | // Deprecated in RN 0.47 26 | public List> createJSModules() { 27 | return Collections.emptyList(); 28 | } 29 | 30 | @NonNull 31 | @Override 32 | public List createViewManagers(@NonNull ReactApplicationContext reactContext) { 33 | return Collections.emptyList(); 34 | } 35 | } -------------------------------------------------------------------------------- /android/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/app_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/button_cancel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/button_ok.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/dialog_fragment_round_icon_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/edit_text_rounded.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_apps.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_arrow_back.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_call.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_call_made.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_call_received.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_cancel.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_check.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_cloud_done.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_delete.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_delete_white.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_dot.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_dot_selected.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_error.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_face.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_geo_fence.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_geofence.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_home_.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_info.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_kidsafe.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_language.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_launcher_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/android/src/main/res/drawable/ic_launcher_about.png -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 8 | 11 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_location.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_location_child.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_lock.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_lock_white.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_mail.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_message.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_permissions_calls.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 27 | 30 | 33 | 36 | 39 | 40 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_permissions_location.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 27 | 30 | 33 | 36 | 39 | 42 | 45 | 48 | 51 | 54 | 57 | 58 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_permissions_main.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 18 | 21 | 24 | 27 | 30 | 33 | 36 | 39 | 42 | 45 | 48 | 51 | 54 | 55 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_permissions_messages.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_person.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_profile_image.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_reset.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_settings.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_stats.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/src/main/res/drawable/ic_verified_user.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /android/src/main/res/font/open_sans_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/android/src/main/res/font/open_sans_bold.ttf -------------------------------------------------------------------------------- /android/src/main/res/font/open_sans_extra_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/android/src/main/res/font/open_sans_extra_bold.ttf -------------------------------------------------------------------------------- /android/src/main/res/font/open_sans_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NoodleOfDeath/react-native-screen-time-api/edbf25f5f5e101a52fa9c4984c544d30b61148d7/android/src/main/res/font/open_sans_regular.ttf -------------------------------------------------------------------------------- /android/src/main/res/layout/activity_account_verification.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 13 | 14 | 22 | 23 | 24 | 35 | 36 | 37 | 47 | 48 | 49 |