Handle notification permission
This commit is contained in:
parent
bb051e3811
commit
74cc5f99b1
|
@ -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,9 @@ 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