How can I get data or title from receiving notifications?

后端 未结 2 1315
梦如初夏
梦如初夏 2021-01-28 08:10

I create simple \"ParseStarterProject\" as default of parse.com project. It works. I send notification from one device to other device successfully via setchann

2条回答
  •  别那么骄傲
    2021-01-28 08:21

    Create a class that extends BroadcastReceiver, here we call it MyCustomReceiver. Declare the usage of this receiver in your manifest:

    
      
        
      
    
    

    I'm not sure what you mean by you have problems with "MyCustomReceiver class on the main activity", in your comment to @kingspeech's answer.


    In the worst case, you can create your own Receiver which extends the ParseBroadcastReceiver (and reference the extended class in the manifest). Then it should work by default, but you'll be able to hook into onReceive(Context, Intent)

提交回复
热议问题