mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-21 17:05:39 +03:00
a5fa01d5bf
Change-Id: I3613db1c5495549a0ea92ec96967b5c408c6aadb
25 lines
1.4 KiB
Bash
Executable file
25 lines
1.4 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
## From https://developer.android.com/develop/ui/views/notifications/notification-permission#test
|
|
|
|
PACKAGE_NAME=de.spiritcroc.riotx.debug
|
|
|
|
# App is newly installed on a device that runs Android 13 or higher:
|
|
|
|
adb shell pm revoke ${PACKAGE_NAME} android.permission.POST_NOTIFICATIONS
|
|
adb shell pm clear-permission-flags ${PACKAGE_NAME} android.permission.POST_NOTIFICATIONS user-set
|
|
adb shell pm clear-permission-flags ${PACKAGE_NAME} android.permission.POST_NOTIFICATIONS user-fixed
|
|
|
|
# The user keeps notifications enabled when the app is installed on a device that runs 12L or lower,
|
|
# then the device upgrades to Android 13 or higher:
|
|
|
|
# adb shell pm grant ${PACKAGE_NAME} android.permission.POST_NOTIFICATIONS
|
|
# adb shell pm set-permission-flags ${PACKAGE_NAME} android.permission.POST_NOTIFICATIONS user-set
|
|
# adb shell pm clear-permission-flags ${PACKAGE_NAME} android.permission.POST_NOTIFICATIONS user-fixed
|
|
|
|
# The user manually disables notifications when the app is installed on a device that runs 12L or lower,
|
|
# then the device upgrades to Android 13 or higher:
|
|
|
|
# adb shell pm revoke ${PACKAGE_NAME} android.permission.POST_NOTIFICATIONS
|
|
# adb shell pm set-permission-flags ${PACKAGE_NAME} android.permission.POST_NOTIFICATIONS user-set
|
|
# adb shell pm clear-permission-flags ${PACKAGE_NAME} android.permission.POST_NOTIFICATIONS user-fixed
|