forked from reya/coop-mobile
28 lines
696 B
Kotlin
28 lines
696 B
Kotlin
package su.reya.coop
|
|
|
|
import android.content.Intent
|
|
import android.os.Build
|
|
import android.os.Bundle
|
|
import androidx.activity.ComponentActivity
|
|
import androidx.activity.compose.setContent
|
|
import androidx.activity.enableEdgeToEdge
|
|
|
|
class MainActivity : ComponentActivity() {
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
enableEdgeToEdge()
|
|
super.onCreate(savedInstanceState)
|
|
|
|
val intent = Intent(this, NostrForegroundService::class.java)
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
startForegroundService(intent)
|
|
} else {
|
|
startService(intent)
|
|
}
|
|
|
|
setContent {
|
|
App()
|
|
}
|
|
}
|
|
}
|