Merge pull request #426 from Naveen3Singh/post_notifications
Handle post notification permission
This commit is contained in:
commit
95df1bf835
|
@ -12,6 +12,7 @@
|
|||
<uses-permission android:name="android.provider.Telephony.SMS_RECEIVED" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
|
|
|
@ -158,6 +158,12 @@ class MainActivity : SimpleActivity() {
|
|||
handlePermission(PERMISSION_SEND_SMS) {
|
||||
if (it) {
|
||||
handlePermission(PERMISSION_READ_CONTACTS) {
|
||||
handleNotificationPermission { granted ->
|
||||
if (!granted) {
|
||||
toast(R.string.no_post_notifications_permissions)
|
||||
}
|
||||
}
|
||||
|
||||
initMessenger()
|
||||
bus = EventBus.getDefault()
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue