GCM How do I detect if app is open and if so pop up an alert box, instead of normal notification flow?

后端 未结 4 914
猫巷女王i
猫巷女王i 2021-02-03 13:47

I have an app where I want to build 2 different flow\'s in:

  • 1.a App is open on any activity
  • 1.b App show\'s an alertbox where user can choose to go to

4条回答
  •  迷失自我
    2021-02-03 14:31

    In my code I have public static ArrayList activity_stack every activity is added in oncreate and removed in ondestroy methods. I check this stack in GcmBroadcastReceiver. I don't know if it's a good solution.

提交回复
热议问题