2019-06-19 01:38:55 +02:00
|
|
|
package info.nightscout.androidaps.activities
|
|
|
|
|
|
|
|
import android.os.Bundle
|
|
|
|
import info.nightscout.androidaps.plugins.source.SourceDexcomPlugin
|
|
|
|
|
2020-01-26 18:17:00 +01:00
|
|
|
class RequestDexcomPermissionActivity : DialogAppCompatActivity() {
|
2019-06-19 01:38:55 +02:00
|
|
|
|
|
|
|
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()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|