package com.ejada.hmg
import android.os.Bundle
import android.util.Log
import android.os.Build
import android.view.WindowManager
import androidx.annotation.NonNull;
import com.ejada.hmg.utils.*
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterFragmentActivity() {
    override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
        GeneratedPluginRegistrant.registerWith(flutterEngine);
        // Create Flutter Platform Bridge
        this.window.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON or WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD or WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON)

        PlatformBridge(flutterEngine, this).create()
        OpenTokPlatformBridge(flutterEngine, this).create()

        val time = timeToMillis("04:00:00", "HH:mm:ss")


//        val d1 =  Logs.list(this)
//        val d2 =  Logs.raw(this)
//        val d3 = Logs.RegisterGeofence.list(this)
//        val d4 = Logs.RegisterGeofence.raw(this)
//        val d5 = Logs.GeofenceEvent.list(this)
//        val d6 = Logs.GeofenceEvent.raw(this)

    }

    override fun onResume() {
        super.onResume()
    }
}