0

I am wondering if I can use parse as a notification service for the backend instead of to notifying the user. I am wondering if sending a push notification can start a background activity to run some code in the background. Would this be possible or should I try a different service. If so, could you recommend any other services and/or solutions to the problem. All of the other services seem to be the same and the only other solution I can think of is scanning the server every little while in the background. I am afraid that will use too much battery life.

Ajay
  • 437
  • 7
  • 22

1 Answers1

2

Sure, you can do this with a combination of push notifications and their proper handlers.

  1. Send the push as a silent push. As noted in this SO post, silent push reception is the default- you have to add extra code to interact with the user.
  2. When you receive it, process it appropriately to run background code instead of interacting with the user. You can read more about how to receive and process a push in the Parse.com Push Guide for Android.
Community
  • 1
  • 1
Ryan Kreager
  • 3,571
  • 1
  • 20
  • 35
  • Thanks I'll try that out now! – Ajay Jul 13 '15 at 23:50
  • I still do not understand how to process it since when I try to implement `ParsePushBroadcastReceiver ` it just says `ParsePushBroadcastReceiver cannot be resolved to a type`. Do I have to change or add actions in the intent filter in the androidmanifest xml? I followed the tutorial to setup my manifest so everything should be default. – Ajay Jul 13 '15 at 23:59