`), but not anyone else's.
+
+> To learn more and see examples of permissions depending on a certain use case, see [Device Sync Permissions Guide](https://www.mongodb.com/docs/atlas/app-services/sync/app-builder/device-sync-permissions-guide/#std-label-flexible-sync-permissions-guide) and [Data Access Role Examples](https://www.mongodb.com/docs/atlas/app-services/rules/examples/).
+
+## Troubleshooting
+
+A great help when troubleshooting is to look at the [Application Logs](https://www.mongodb.com/docs/atlas/app-services/activity/view-logs/) in the App Services UI.
+
+### Permissions
+
+If permission is denied:
+ * Make sure your IP address is on the [IP Access List](https://www.mongodb.com/docs/atlas/app-services/security/network/#ip-access-list) for your App.
+ * Make sure you have the correct data access permissions for the collections.
+ * See [Set Data Access Permissions](#set-data-access-permissions) further above.
+
+### Removing the Local Realm Database
+
+Removing the local database can be useful for certain errors.
+
+On an iOS simulator:
+1. Press and hold the app icon on the Home Screen.
+2. Choose to remove the app and its data.
+
+On an Android emulator via Android Studio:
+1. Quit the emulator if it is running.
+2. Open `Device Manager`.
+3. Select `Wipe Data` for the relevant emulator.
diff --git a/examples/rn-todo-list/backend/README.md b/examples/rn-todo-list/backend/README.md
new file mode 100644
index 0000000000..07508bebf5
--- /dev/null
+++ b/examples/rn-todo-list/backend/README.md
@@ -0,0 +1,7 @@
+# Backend
+
+This contains the Atlas App Services App and its configurations for the example app.
+
+Please see the [main README](../README.md) for all instructions.
+
+> To learn more about the backend file structure, see [App Configuration](https://www.mongodb.com/docs/atlas/app-services/reference/config/).
diff --git a/examples/rn-todo-list/backend/auth/custom_user_data.json b/examples/rn-todo-list/backend/auth/custom_user_data.json
new file mode 100644
index 0000000000..a82d0fb255
--- /dev/null
+++ b/examples/rn-todo-list/backend/auth/custom_user_data.json
@@ -0,0 +1,3 @@
+{
+ "enabled": false
+}
diff --git a/examples/rn-todo-list/backend/auth/providers.json b/examples/rn-todo-list/backend/auth/providers.json
new file mode 100644
index 0000000000..352f51d7d1
--- /dev/null
+++ b/examples/rn-todo-list/backend/auth/providers.json
@@ -0,0 +1,22 @@
+{
+ "anon-user": {
+ "name": "anon-user",
+ "type": "anon-user",
+ "disabled": false
+ },
+ "api-key": {
+ "name": "api-key",
+ "type": "api-key",
+ "disabled": true
+ },
+ "local-userpass": {
+ "name": "local-userpass",
+ "type": "local-userpass",
+ "config": {
+ "autoConfirm": true,
+ "resetPasswordUrl": "https://",
+ "runConfirmationFunction": false
+ },
+ "disabled": false
+ }
+}
diff --git a/examples/rn-todo-list/backend/data_sources/mongodb-atlas/TodoList/Task/relationships.json b/examples/rn-todo-list/backend/data_sources/mongodb-atlas/TodoList/Task/relationships.json
new file mode 100644
index 0000000000..0967ef424b
--- /dev/null
+++ b/examples/rn-todo-list/backend/data_sources/mongodb-atlas/TodoList/Task/relationships.json
@@ -0,0 +1 @@
+{}
diff --git a/examples/rn-todo-list/backend/data_sources/mongodb-atlas/TodoList/Task/rules.json b/examples/rn-todo-list/backend/data_sources/mongodb-atlas/TodoList/Task/rules.json
new file mode 100644
index 0000000000..6ca1b3345c
--- /dev/null
+++ b/examples/rn-todo-list/backend/data_sources/mongodb-atlas/TodoList/Task/rules.json
@@ -0,0 +1,23 @@
+{
+ "collection": "Task",
+ "database": "TodoList",
+ "roles": [
+ {
+ "name": "readOwnWriteOwn",
+ "apply_when": {},
+ "document_filters": {
+ "write": {
+ "userId": "%%user.id"
+ },
+ "read": {
+ "userId": "%%user.id"
+ }
+ },
+ "read": true,
+ "write": true,
+ "insert": true,
+ "delete": true,
+ "search": true
+ }
+ ]
+}
diff --git a/examples/rn-todo-list/backend/data_sources/mongodb-atlas/TodoList/Task/schema.json b/examples/rn-todo-list/backend/data_sources/mongodb-atlas/TodoList/Task/schema.json
new file mode 100644
index 0000000000..08ef6db636
--- /dev/null
+++ b/examples/rn-todo-list/backend/data_sources/mongodb-atlas/TodoList/Task/schema.json
@@ -0,0 +1,28 @@
+{
+ "properties": {
+ "_id": {
+ "bsonType": "objectId"
+ },
+ "createdAt": {
+ "bsonType": "date"
+ },
+ "description": {
+ "bsonType": "string"
+ },
+ "isComplete": {
+ "bsonType": "bool"
+ },
+ "userId": {
+ "bsonType": "string"
+ }
+ },
+ "required": [
+ "_id",
+ "createdAt",
+ "description",
+ "isComplete",
+ "userId"
+ ],
+ "title": "Task",
+ "type": "object"
+}
diff --git a/examples/rn-todo-list/backend/data_sources/mongodb-atlas/config.json b/examples/rn-todo-list/backend/data_sources/mongodb-atlas/config.json
new file mode 100644
index 0000000000..9913676dd9
--- /dev/null
+++ b/examples/rn-todo-list/backend/data_sources/mongodb-atlas/config.json
@@ -0,0 +1,10 @@
+{
+ "name": "mongodb-atlas",
+ "type": "mongodb-atlas",
+ "config": {
+ "clusterName": "Cluster0",
+ "readPreference": "primary",
+ "wireProtocolEnabled": false
+ },
+ "version": 1
+}
diff --git a/examples/rn-todo-list/backend/data_sources/mongodb-atlas/default_rule.json b/examples/rn-todo-list/backend/data_sources/mongodb-atlas/default_rule.json
new file mode 100644
index 0000000000..86c55c8767
--- /dev/null
+++ b/examples/rn-todo-list/backend/data_sources/mongodb-atlas/default_rule.json
@@ -0,0 +1,17 @@
+{
+ "roles": [
+ {
+ "name": "readAndWriteAll",
+ "apply_when": {},
+ "document_filters": {
+ "write": true,
+ "read": true
+ },
+ "read": true,
+ "write": true,
+ "insert": true,
+ "delete": true,
+ "search": true
+ }
+ ]
+}
diff --git a/examples/rn-todo-list/backend/environments/development.json b/examples/rn-todo-list/backend/environments/development.json
new file mode 100644
index 0000000000..ad7e98e68c
--- /dev/null
+++ b/examples/rn-todo-list/backend/environments/development.json
@@ -0,0 +1,3 @@
+{
+ "values": {}
+}
diff --git a/examples/rn-todo-list/backend/environments/no-environment.json b/examples/rn-todo-list/backend/environments/no-environment.json
new file mode 100644
index 0000000000..ad7e98e68c
--- /dev/null
+++ b/examples/rn-todo-list/backend/environments/no-environment.json
@@ -0,0 +1,3 @@
+{
+ "values": {}
+}
diff --git a/examples/rn-todo-list/backend/environments/production.json b/examples/rn-todo-list/backend/environments/production.json
new file mode 100644
index 0000000000..ad7e98e68c
--- /dev/null
+++ b/examples/rn-todo-list/backend/environments/production.json
@@ -0,0 +1,3 @@
+{
+ "values": {}
+}
diff --git a/examples/rn-todo-list/backend/environments/qa.json b/examples/rn-todo-list/backend/environments/qa.json
new file mode 100644
index 0000000000..ad7e98e68c
--- /dev/null
+++ b/examples/rn-todo-list/backend/environments/qa.json
@@ -0,0 +1,3 @@
+{
+ "values": {}
+}
diff --git a/examples/rn-todo-list/backend/environments/testing.json b/examples/rn-todo-list/backend/environments/testing.json
new file mode 100644
index 0000000000..ad7e98e68c
--- /dev/null
+++ b/examples/rn-todo-list/backend/environments/testing.json
@@ -0,0 +1,3 @@
+{
+ "values": {}
+}
diff --git a/examples/rn-todo-list/backend/functions/config.json b/examples/rn-todo-list/backend/functions/config.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/examples/rn-todo-list/backend/functions/config.json
@@ -0,0 +1 @@
+[]
diff --git a/examples/rn-todo-list/backend/graphql/config.json b/examples/rn-todo-list/backend/graphql/config.json
new file mode 100644
index 0000000000..406b1abcde
--- /dev/null
+++ b/examples/rn-todo-list/backend/graphql/config.json
@@ -0,0 +1,4 @@
+{
+ "use_natural_pluralization": true,
+ "disable_schema_introspection": false
+}
diff --git a/examples/rn-todo-list/backend/http_endpoints/config.json b/examples/rn-todo-list/backend/http_endpoints/config.json
new file mode 100644
index 0000000000..fe51488c70
--- /dev/null
+++ b/examples/rn-todo-list/backend/http_endpoints/config.json
@@ -0,0 +1 @@
+[]
diff --git a/examples/rn-todo-list/backend/realm_config.json b/examples/rn-todo-list/backend/realm_config.json
new file mode 100644
index 0000000000..aff50a7db3
--- /dev/null
+++ b/examples/rn-todo-list/backend/realm_config.json
@@ -0,0 +1,7 @@
+{
+ "config_version": 20210101,
+ "name": "Todo-List",
+ "location": "IE",
+ "provider_region": "aws-eu-west-1",
+ "deployment_model": "GLOBAL"
+}
diff --git a/examples/rn-todo-list/backend/sync/config.json b/examples/rn-todo-list/backend/sync/config.json
new file mode 100644
index 0000000000..78f4a71c74
--- /dev/null
+++ b/examples/rn-todo-list/backend/sync/config.json
@@ -0,0 +1,19 @@
+{
+ "type": "flexible",
+ "state": "enabled",
+ "development_mode_enabled": true,
+ "service_name": "mongodb-atlas",
+ "database_name": "TodoList",
+ "client_max_offline_days": 30,
+ "is_recovery_mode_disabled": false,
+ "permissions": {
+ "rules": {},
+ "defaultRoles": []
+ },
+ "collection_queryable_fields_names": {
+ "Task": [
+ "isComplete",
+ "userId"
+ ]
+ }
+}
diff --git a/example/.bundle/config b/examples/rn-todo-list/frontend/.bundle/config
similarity index 100%
rename from example/.bundle/config
rename to examples/rn-todo-list/frontend/.bundle/config
diff --git a/examples/rn-todo-list/frontend/.eslintrc.js b/examples/rn-todo-list/frontend/.eslintrc.js
new file mode 100644
index 0000000000..308f4ed596
--- /dev/null
+++ b/examples/rn-todo-list/frontend/.eslintrc.js
@@ -0,0 +1,22 @@
+////////////////////////////////////////////////////////////////////////////
+//
+// Copyright 2023 Realm Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////
+
+module.exports = {
+ root: true,
+ extends: '@react-native',
+};
diff --git a/example/.gitignore b/examples/rn-todo-list/frontend/.gitignore
similarity index 97%
rename from example/.gitignore
rename to examples/rn-todo-list/frontend/.gitignore
index 16f8c30773..0cab2ac6fc 100644
--- a/example/.gitignore
+++ b/examples/rn-todo-list/frontend/.gitignore
@@ -61,3 +61,6 @@ yarn-error.log
# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
+
+# testing
+/coverage
diff --git a/examples/rn-todo-list/frontend/.prettierrc.js b/examples/rn-todo-list/frontend/.prettierrc.js
new file mode 100644
index 0000000000..6857cd6f1e
--- /dev/null
+++ b/examples/rn-todo-list/frontend/.prettierrc.js
@@ -0,0 +1,25 @@
+////////////////////////////////////////////////////////////////////////////
+//
+// Copyright 2023 Realm Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////
+
+module.exports = {
+ arrowParens: 'avoid',
+ bracketSameLine: true,
+ bracketSpacing: false,
+ singleQuote: true,
+ trailingComma: 'all',
+};
diff --git a/example/.ruby-version b/examples/rn-todo-list/frontend/.ruby-version
similarity index 100%
rename from example/.ruby-version
rename to examples/rn-todo-list/frontend/.ruby-version
diff --git a/examples/rn-todo-list/frontend/.watchmanconfig b/examples/rn-todo-list/frontend/.watchmanconfig
new file mode 100644
index 0000000000..0967ef424b
--- /dev/null
+++ b/examples/rn-todo-list/frontend/.watchmanconfig
@@ -0,0 +1 @@
+{}
diff --git a/example/Gemfile b/examples/rn-todo-list/frontend/Gemfile
similarity index 53%
rename from example/Gemfile
rename to examples/rn-todo-list/frontend/Gemfile
index 567e59805c..1fa2c2e1ab 100644
--- a/example/Gemfile
+++ b/examples/rn-todo-list/frontend/Gemfile
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
-ruby File.read(File.join(__dir__, '.ruby-version')).strip
+ruby ">= 2.6.10"
-gem 'cocoapods', '~> 1.11', '>= 1.11.3'
+gem 'cocoapods', '~> 1.12'
diff --git a/examples/rn-todo-list/frontend/README.md b/examples/rn-todo-list/frontend/README.md
new file mode 100644
index 0000000000..97c45eac17
--- /dev/null
+++ b/examples/rn-todo-list/frontend/README.md
@@ -0,0 +1,5 @@
+# Frontend
+
+This contains the React Native code base for the example app.
+
+Please see the [main README](../README.md) for all instructions.
diff --git a/example/__tests__/App-test.tsx b/examples/rn-todo-list/frontend/__tests__/App.test.tsx
similarity index 65%
rename from example/__tests__/App-test.tsx
rename to examples/rn-todo-list/frontend/__tests__/App.test.tsx
index 178476699b..b2ef268594 100644
--- a/example/__tests__/App-test.tsx
+++ b/examples/rn-todo-list/frontend/__tests__/App.test.tsx
@@ -4,7 +4,10 @@
import 'react-native';
import React from 'react';
-import App from '../App';
+import {App} from '../index';
+
+// Note: import explicitly to use the types shipped with jest.
+import {it} from '@jest/globals';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
diff --git a/example/android/app/build.gradle b/examples/rn-todo-list/frontend/android/app/build.gradle
similarity index 64%
rename from example/android/app/build.gradle
rename to examples/rn-todo-list/frontend/android/app/build.gradle
index bceecd7e44..28d21fa625 100644
--- a/example/android/app/build.gradle
+++ b/examples/rn-todo-list/frontend/android/app/build.gradle
@@ -1,8 +1,6 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
-import com.android.build.OutputFile
-
/**
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
@@ -12,11 +10,11 @@ react {
// The root of your project, i.e. where "package.json" lives. Default is '..'
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
- reactNativeDir = file("../../../node_modules/react-native")
- // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
- codegenDir = file("../../../node_modules/react-native-codegen")
+ // reactNativeDir = file("../node_modules/react-native")
+ // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
+ // codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
- cliFile = file("../../../node_modules/react-native/cli.js")
+ // cliFile = file("../node_modules/react-native/cli.js")
/* Variants */
// The list of variants to that are debuggable. For those we're going to
@@ -52,14 +50,6 @@ react {
// hermesFlags = ["-O", "-output-source-map"]
}
-/**
- * Set this to true to create four separate APKs instead of one,
- * one for each native architecture. This is useful if you don't
- * use App Bundles (https://developer.android.com/guide/app-bundle/)
- * and want to have separate APKs to upload to the Play Store.
- */
-def enableSeparateBuildPerCPUArchitecture = false
-
/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
@@ -78,38 +68,19 @@ def enableProguardInReleaseBuilds = false
*/
def jscFlavor = 'org.webkit:android-jsc:+'
-/**
- * Private function to get the list of Native Architectures you want to build.
- * This reads the value from reactNativeArchitectures in your gradle.properties
- * file and works together with the --active-arch-only flag of react-native run-android.
- */
-def reactNativeArchitectures() {
- def value = project.getProperties().get("reactNativeArchitectures")
- return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
-}
-
android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
- namespace "com.realmexample"
+ namespace "com.examplerntodolist"
defaultConfig {
- applicationId "com.realmexample"
+ applicationId "com.examplerntodolist"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
-
- splits {
- abi {
- reset()
- enable enableSeparateBuildPerCPUArchitecture
- universalApk false // If true, also generate a universal APK
- include (*reactNativeArchitectures())
- }
- }
signingConfigs {
debug {
storeFile file('debug.keystore')
@@ -130,30 +101,12 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
-
- // applicationVariants are e.g. debug, release
- applicationVariants.all { variant ->
- variant.outputs.each { output ->
- // For each separate APK per architecture, set a unique version code as described here:
- // https://developer.android.com/studio/build/configure-apk-splits.html
- // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
- def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
- def abi = output.getFilter(OutputFile.ABI)
- if (abi != null) { // null for the universal-debug, universal-release variants
- output.versionCodeOverride =
- defaultConfig.versionCode * 1000 + versionCodes.get(abi)
- }
-
- }
- }
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
- implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
@@ -167,4 +120,4 @@ dependencies {
}
}
-apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
diff --git a/example/android/app/debug.keystore b/examples/rn-todo-list/frontend/android/app/debug.keystore
similarity index 100%
rename from example/android/app/debug.keystore
rename to examples/rn-todo-list/frontend/android/app/debug.keystore
diff --git a/example/android/app/proguard-rules.pro b/examples/rn-todo-list/frontend/android/app/proguard-rules.pro
similarity index 100%
rename from example/android/app/proguard-rules.pro
rename to examples/rn-todo-list/frontend/android/app/proguard-rules.pro
diff --git a/example/android/app/src/debug/AndroidManifest.xml b/examples/rn-todo-list/frontend/android/app/src/debug/AndroidManifest.xml
similarity index 100%
rename from example/android/app/src/debug/AndroidManifest.xml
rename to examples/rn-todo-list/frontend/android/app/src/debug/AndroidManifest.xml
diff --git a/example/android/app/src/debug/java/com/realmexample/ReactNativeFlipper.java b/examples/rn-todo-list/frontend/android/app/src/debug/java/com/examplerntodolist/ReactNativeFlipper.java
similarity index 99%
rename from example/android/app/src/debug/java/com/realmexample/ReactNativeFlipper.java
rename to examples/rn-todo-list/frontend/android/app/src/debug/java/com/examplerntodolist/ReactNativeFlipper.java
index 3b5df21548..9ea2348a5b 100644
--- a/example/android/app/src/debug/java/com/realmexample/ReactNativeFlipper.java
+++ b/examples/rn-todo-list/frontend/android/app/src/debug/java/com/examplerntodolist/ReactNativeFlipper.java
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
-package com.realmexample;
+package com.examplerntodolist;
import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
diff --git a/example/android/app/src/main/AndroidManifest.xml b/examples/rn-todo-list/frontend/android/app/src/main/AndroidManifest.xml
similarity index 100%
rename from example/android/app/src/main/AndroidManifest.xml
rename to examples/rn-todo-list/frontend/android/app/src/main/AndroidManifest.xml
diff --git a/example/android/app/src/main/java/com/realmexample/MainActivity.java b/examples/rn-todo-list/frontend/android/app/src/main/java/com/examplerntodolist/MainActivity.java
similarity index 74%
rename from example/android/app/src/main/java/com/realmexample/MainActivity.java
rename to examples/rn-todo-list/frontend/android/app/src/main/java/com/examplerntodolist/MainActivity.java
index d7550543a1..e4a8493c92 100644
--- a/example/android/app/src/main/java/com/realmexample/MainActivity.java
+++ b/examples/rn-todo-list/frontend/android/app/src/main/java/com/examplerntodolist/MainActivity.java
@@ -1,4 +1,4 @@
-package com.realmexample;
+package com.examplerntodolist;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
@@ -13,7 +13,7 @@ public class MainActivity extends ReactActivity {
*/
@Override
protected String getMainComponentName() {
- return "RealmExample";
+ return "ExampleRnTodoList";
}
/**
@@ -27,9 +27,6 @@ protected ReactActivityDelegate createReactActivityDelegate() {
this,
getMainComponentName(),
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
- DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
- // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
- DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
- );
+ DefaultNewArchitectureEntryPoint.getFabricEnabled());
}
}
diff --git a/example/android/app/src/main/java/com/realmexample/MainApplication.java b/examples/rn-todo-list/frontend/android/app/src/main/java/com/examplerntodolist/MainApplication.java
similarity index 98%
rename from example/android/app/src/main/java/com/realmexample/MainApplication.java
rename to examples/rn-todo-list/frontend/android/app/src/main/java/com/examplerntodolist/MainApplication.java
index d438b8e4a2..34eb221c40 100644
--- a/example/android/app/src/main/java/com/realmexample/MainApplication.java
+++ b/examples/rn-todo-list/frontend/android/app/src/main/java/com/examplerntodolist/MainApplication.java
@@ -1,4 +1,4 @@
-package com.realmexample;
+package com.examplerntodolist;
import android.app.Application;
import com.facebook.react.PackageList;
diff --git a/example/android/app/src/main/res/drawable/rn_edit_text_material.xml b/examples/rn-todo-list/frontend/android/app/src/main/res/drawable/rn_edit_text_material.xml
similarity index 99%
rename from example/android/app/src/main/res/drawable/rn_edit_text_material.xml
rename to examples/rn-todo-list/frontend/android/app/src/main/res/drawable/rn_edit_text_material.xml
index f35d996202..73b37e4d99 100644
--- a/example/android/app/src/main/res/drawable/rn_edit_text_material.xml
+++ b/examples/rn-todo-list/frontend/android/app/src/main/res/drawable/rn_edit_text_material.xml
@@ -20,7 +20,7 @@
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
-