LoginSignup
2
1

More than 1 year has passed since last update.

Jetpack ComposeでOSのアラーム設定を開きたい

Last updated at Posted at 2023-02-01

参考

AlarmClock.ACTION_SHOW_ALARMS
というActionでIntentを作成してstartActivity

コード

import android.content.Intent
import android.provider.AlarmClock
..
省略
..
            val intent = Intent(AlarmClock.ACTION_SHOW_ALARMS)
            if (intent.resolveActivity(context.packageManager) != null) {
                context.startActivity(intent)
            }

AndroidManifestに追記が必要

    <uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1