使用android推送通知在后台触发事件

使用android推送通知在后台触发事件,android,android-notifications,google-cloud-messaging,Android,Android Notifications,Google Cloud Messaging,我需要知道,当智能手机收到推送通知时,该通知是否不会显示给用户,但智能手机开始向web服务器发送gps位置。 对不起,我的英语真的很差。当通过广播接收器收到推送通知时,您可以做任何您想做的事情 @Override protected void onMessageReceived(Context context, Intent intent) { //i suppose sendGPS is the function that let you send your location

我需要知道,当智能手机收到推送通知时,该通知是否不会显示给用户,但智能手机开始向web服务器发送gps位置。
对不起,我的英语真的很差。

当通过广播接收器收到推送通知时,您可以做任何您想做的事情

 @Override
protected void onMessageReceived(Context context, Intent intent) {
    //i suppose sendGPS is the function that let you send your location
    sendGPS();
}