0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

(テスト) 通知設定

Posted at

通知

▼Notificasion
役割➞メッセージやイベントを通知でアプリケーション外でユーザーが情報にアクセスできるようにする。
特徴➞ステータスバーや、通知トレイに表示される。リアルタイムで通知。通知の中身をカスタマイズ可能りユーザーインタラクション。
使用例➞
通知チャンネルを作成する
ID、チャンネル名、重要度の設定を組み込んだ
通知チャンネルの元を用意
通知マネージャーを使って通知チャンネル登録
通知の作成
NotificationCompat.Builder(this, "my_channel_id")
contextとIDを設定して
セットを使ってアイコンや、メッセージを設定
通知の送信

val notificationId = 1 // 通知の一意なID
with(NotificationManagerCompat.from(this)) {
notify(notificationId, notificationBuilder.build())
}

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?