Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kobakei committed Dec 3, 2017
1 parent 3b57276 commit 5c71a0d
Show file tree
Hide file tree
Showing 5 changed files with 306 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Expand Up @@ -2,6 +2,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.github.kobakei.androidnotificationshowcase">

<!-- 古いAndroidで必要 -->
<uses-permission android:name="android.permission.VIBRATE"/>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
Expand Down
Expand Up @@ -13,24 +13,34 @@ class MainActivity : AppCompatActivity() {
NotificationUtility.setUpNotificationChannel(applicationContext)

buttonBasic.setOnClickListener {
NotificationUtility.showNotification(applicationContext, "channel",
"This is title", "This is message")
NotificationUtility.showNotification(applicationContext)
}
buttonAction.setOnClickListener {
NotificationUtility.showNotificationWithActions(applicationContext, "channel",
"This is title", "This is message")
NotificationUtility.showNotificationWithActions(applicationContext)
}
buttonBigPicture.setOnClickListener {
NotificationUtility.showBigPictureNotification(applicationContext, "channel",
"This is title", "This is message")
NotificationUtility.showBigPictureNotification(applicationContext)
}
buttonBigText.setOnClickListener {
NotificationUtility.showBigTextNotification(applicationContext, "channel",
"This is title", "This is message")
NotificationUtility.showBigTextNotification(applicationContext)
}
buttonInbox.setOnClickListener {
NotificationUtility.showInboxNotification(applicationContext, "channel",
"This is title", "This is message")
NotificationUtility.showInboxNotification(applicationContext)
}
buttonMessaging.setOnClickListener {
NotificationUtility.showMessagingNotification(applicationContext)
}
buttonDecoratedCustomView.setOnClickListener {
NotificationUtility.showDecoratedCustomViewNotification(applicationContext)
}
buttonHeadUp.setOnClickListener {
NotificationUtility.showHeadUpNotification(applicationContext)
}
buttonLockScreen.setOnClickListener {
NotificationUtility.showLockScreenNotification(applicationContext)
}
buttonBundled.setOnClickListener {
NotificationUtility.showBundledNotification(applicationContext)
}
}

Expand Down

0 comments on commit 5c71a0d

Please sign in to comment.