6dc1a73d2e
- Fullscreen WebView with immersive mode - URL whitelist system - Admin PIN-protected settings - Boot receiver for auto-launch - Idle timeout with homepage reset - Lock Task Mode support - Material Design 3 UI Team: Pluto (coordinator), Margaret, Spirit
20 lines
664 B
Kotlin
20 lines
664 B
Kotlin
package farm.hobbs.kioskbrowser
|
|
|
|
import android.content.BroadcastReceiver
|
|
import android.content.Context
|
|
import android.content.Intent
|
|
|
|
class BootReceiver : BroadcastReceiver() {
|
|
override fun onReceive(context: Context, intent: Intent) {
|
|
if (intent.action == Intent.ACTION_BOOT_COMPLETED ||
|
|
intent.action == "android.intent.action.QUICKBOOT_POWERON") {
|
|
|
|
val launchIntent = Intent(context, MainActivity::class.java).apply {
|
|
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
|
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
|
}
|
|
context.startActivity(launchIntent)
|
|
}
|
|
}
|
|
}
|