diff --git a/android/app/src/main/kotlin/dev/yukart/display/MainActivity.kt b/android/app/src/main/kotlin/dev/yukart/display/MainActivity.kt index 83229b4..35805d0 100644 --- a/android/app/src/main/kotlin/dev/yukart/display/MainActivity.kt +++ b/android/app/src/main/kotlin/dev/yukart/display/MainActivity.kt @@ -2,6 +2,10 @@ package dev.yukart.display import android.content.Context import android.content.Intent +import android.hardware.Sensor +import android.hardware.SensorEvent +import android.hardware.SensorEventListener +import android.hardware.SensorManager import android.net.ConnectivityManager import android.net.Network import android.net.NetworkCapabilities @@ -10,6 +14,7 @@ import android.os.Bundle import android.view.WindowManager import io.flutter.embedding.android.FlutterActivity import io.flutter.embedding.engine.FlutterEngine +import io.flutter.plugin.common.EventChannel import io.flutter.plugin.common.MethodChannel /** @@ -22,6 +27,9 @@ import io.flutter.plugin.common.MethodChannel * When asked, the whole process is bound to the Ethernet (NCM) network while it * exists, and unbound when it goes. * + * Also the light sensor, for auto dark/bright (lib/theme/light.dart): lux on `yukart/light` + * while Dart listens, where the device lets apps read one (the Redmi Pad SE does not). + * * Also a development hook: `am start -n dev.yukart.display/.MainActivity --es linktest [dl:|bi:]