diff options
| author | hc <haocheng.xie@respiree.com> | 2026-04-10 17:39:12 +0800 |
|---|---|---|
| committer | hc <haocheng.xie@respiree.com> | 2026-04-10 17:39:22 +0800 |
| commit | e4fb9966e762852bf17f21c8406501d42fae0b61 (patch) | |
| tree | 658bbdba977ff7846a17ee94b8ed6b676f6ce9dd /android/app/src/main/java/com/ihealthscanner/MainActivity.kt | |
Initial commit: iHealth BLE scanner app with patched SDK v1.5.0
Diffstat (limited to 'android/app/src/main/java/com/ihealthscanner/MainActivity.kt')
| -rw-r--r-- | android/app/src/main/java/com/ihealthscanner/MainActivity.kt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/android/app/src/main/java/com/ihealthscanner/MainActivity.kt b/android/app/src/main/java/com/ihealthscanner/MainActivity.kt new file mode 100644 index 0000000..b22606b --- /dev/null +++ b/android/app/src/main/java/com/ihealthscanner/MainActivity.kt | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | package com.ihealthscanner | ||
| 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 = "iHealthScanner" | ||
| 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 | } | ||
