Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get_Notifications returns -1 although Notifications could be read #106

Open
SiNeumann opened this issue Jan 16, 2023 · 0 comments
Open

Get_Notifications returns -1 although Notifications could be read #106

SiNeumann opened this issue Jan 16, 2023 · 0 comments

Comments

@SiNeumann
Copy link

SiNeumann commented Jan 16, 2023

Get Notifactions on some specific phones (mostly seen on Huawei, eg. P30 light) will return -1 on Broadcast, although the notifcation data could be read from device. Example see below
I saw no obvious code path which could lead to such a result.
Since broadcast completed returns -1: Appium will treat it as an error an all tests depending on this will result in error

Workaround:
Basically run the command via adb directly "adb shell am broadcast -a io.appium.settings.notifications" and interpret the result directly

Example:

Broadcasting: Intent { act=io.appium.settings.notifications flg=0x400000 }
Broadcast completed: result=-1, data="{"statusBarNotifications":[{"packageName":"com.adresys.angel.angelapp","isClearable":true,"isOngoing":false,"id":5,"tag":null,"postTime":1673534390686,"isRemoved":false,"notification":{"title":"Error","bigTitle":null,"text":"Alarm channel not ready, although Internet access present","bigText":null,"tickerText":null,"subText":null,"infoText":null,"template":null},"isGroup":false,"userHandle":0,"groupKey":"0|com.adresys.angel.angelapp|5|null|10482","overrideGroupKey":null,"key":"0|com.adresys.angel.angelapp|5|null|10482"},{"packageName":"com.adresys.angel.angelapp","isClearable":false,"isOngoing":true,"id":6,"tag":null,"postTime":1673534388946,.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant