Clicking on notification doesn't open mentioned activity

后端 未结 10 1144
感动是毒
感动是毒 2020-12-09 16:26

I am trying to open an Activity when the notification is clicked and below is my code.

Intent intent = new Intent(this.getApplicationContext(),         


        
10条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-09 16:48

    Sorry not to add a comment as I'm a fairly new comer.

    You can just do the following two things for further investigating:

    1. After the notification has been created, use shell command "adb shell dumpsys activity i [your package name]" to see your notification in detail, to confirm it is really what you want. Remember to replace "[your package name]" with your own package name;

    2. Tracking the event log during the time you are reproducing this using "adb logcat -v threadtime -b events".

    Post both of these and we might get something useful about what is going wrong under the hood.

提交回复
热议问题