开发者

Notification opens app on BroadCastReceiver

开发者 https://www.devze.com 2023-02-16 21:41 出处:网络
I am sending an sms from my app and then i click the \"Home\" button. When i receive that sms (I am sending an sms from my phone to myself), a Notification will appear. When i click it, the screen (fr

I am sending an sms from my app and then i click the "Home" button. When i receive that sms (I am sending an sms from my phone to myself), a Notification will appear. When i click it, the screen (from where i sended it) will pop-up from background. So what i get is my default view for the notification, and behind it, the screen from where i sent the sms.

My goal here, is to when i click the notification, if the app is in background, i dont want it to b开发者_Python百科e showed.

Thanks.

Edit1: if i do "this.finish()" right before the sms is sent, the app is not "poped-up". (witch makes sense).


Kinda stuppid, with 2 different phones this wont happen. The BroadCastReceiver, receives the context of the intent that sended the sms (at least for what i understood), if I am using the same phone, it will open the app that is on the background. 2 am here, gief me a break. :)

0

精彩评论

暂无评论...
验证码 换一张
取 消