AndroidAPS/app/src/main/java/info/nightscout/androidaps/activities/RequestDexcomPermissionActivity.kt

21 lines
680 B
Kotlin
Raw Normal View History

2019-06-19 01:38:55 +02:00
package info.nightscout.androidaps.activities
import android.os.Build
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import info.nightscout.androidaps.plugins.source.SourceDexcomPlugin
class RequestDexcomPermissionActivity : AppCompatActivity() {
private val requestCode = "AndroidAPS <3".map { it.toInt() }.sum()
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
2019-08-03 20:00:56 +02:00
requestPermissions(arrayOf(SourceDexcomPlugin.PERMISSION), requestCode)
2019-06-19 01:38:55 +02:00
}
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
finish()
}
}