Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 207

ridgerock
Veteran developer
Profile
Posts: 183
Reg: May 19, 2011
Louisville
1,830
01/23/13 07:23 PM (13 years ago)

Push using Parse Channels

Hello All. I am curious if anyone has had any luck segmenting push with channels using Parse? Subscribing to channels is easy on the Parse end but I need to find a way for the user to select what they want to receive pushes for. So a front end that when the user checks a box it subscribes them to a channel in push. Any thoughts??
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/24/13 05:24 AM (13 years ago)
@ridgerock You helped me months back with your tutorial for Android, but something at Parse.com seems to have changed, as of yesterday, I can't get seem to get Parse push to work on android for std push, let alone channels! Alan
 
ridgerock
Veteran developer
Profile
Posts: 183
Reg: May 19, 2011
Louisville
1,830
like
01/24/13 12:09 PM (13 years ago)
Hey Alan, Add this code. That should fix it. PushService.setDefaultPushCallback(context, Activity.class);
 
ridgerock
Veteran developer
Profile
Posts: 183
Reg: May 19, 2011
Louisville
1,830
like
01/24/13 12:39 PM (13 years ago)
Hey Alan, Add this code. That should fix it. PushService.setDefaultPushCallback(context, Activity.class);
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/24/13 02:49 PM (13 years ago)
Thanks @ridgerock, much appreciated - will give it a try.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/25/13 07:56 AM (12 years ago)
Thanks for the tip @ridgerock, I just tried it. It made the difference! I added your suggestion with a minor mod - my main two lines are now PushService.subscribe(this, "", (Class<? extends Activity>) YourActivity.class); PushService.setDefaultPushCallback(this, Activity.class); Thing is, it seems that the apps I had previously published (which did not have the second line) no longer show the push (which was viewable in the system tray area), although I believe the apps still register OK with parse.com (from their console info). I haven't changed anything, so I wondered if parse have or if I was never doing things the correct way in the past? It's annoying as I have apps that will now need to be re-published in google play. Do you know how to make the alert pop up in the app?
 
feraco
Aspiring developer
Profile
Posts: 705
Reg: Jan 23, 2012
nyc
15,050
like
07/08/13 07:42 AM (12 years ago)
Hello I am stuck trying to do the same thing ridgerock is trying to do and i dont know what to do. I need a way for the users to subscribe for certain channels. I used the example in the installation example on parse .com to create a channel. [currentInstallation addUniqueObject:@"Giants" forKey:@"channels"]; Now that the channel is created I need a way for the user to select if they want to subscribe to the channel. Can anyone help?
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
07/08/13 08:17 AM (12 years ago)
Hi @feraco, it sounds like you need to form some kind of json request that can be sent to Parse. I believe this can be done with JavaScript, but I am no guru. The best advice I can offer is to contact parse.com directly, I have found their tech support are very helpful and they may be able to offer an example. Alan
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.