Discussion Forums  >  Self Hosted Control Panels

Replies: 17    Views: 394

Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
02/18/13 06:55 AM (12 years ago)

Android push notifications on self hosted not working

Can't get push notifications for android on self hosted to work, have I missed a post with the problem? gcm is set up ok, my device is registering and requests are showing in my gcm dashboard. I've got hostgator to open ports 5228, 5229 and 5230 as per google documentation: http://developer.android.com/google/gcm/gcm.html cURL is activated on my domain. also opened ports 5223, 2195, 2196 and 443 as per MrDavid's fix. updated the file pushNotifications_AJAX.php file mentioned here: https://www.buzztouch.com/forum/thread.php?tid=9A9D62232E8EAC574F34609 and also tried the code change mentioned (remove @ and change 2 to 30). followed the guides - activatede prompt in core settings, added project number to gcmconfig.java, correct project id, correct api key etc etc. Still no devices showing in my self hosted dashboard and no pushes can be sent.
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
02/18/13 07:08 AM (12 years ago)
I have my IOS devices showing on self control panel, but am unable to receive notifications as well
 
Rishav
Code is Art
Profile
Posts: 153
Reg: Jan 26, 2012
Dubai
8,780
like
02/18/13 09:25 AM (12 years ago)
Have you placed your google project id in BT_gcmConfig.java in SENDER_ID variable...Its working fine with me..
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
02/18/13 09:57 AM (12 years ago)
yup, mentioned in my OP.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
02/18/13 10:44 AM (12 years ago)
@Rishav, do you mean the google project Id or the Project Number? The project number seems to be the only way I can register a device with gcm. Using the project id throws an error message on the device.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
02/18/13 12:08 PM (12 years ago)
Ah well. Before the thread drops off the first page and into obscurity I'll make a last desperate appeal for help... help.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
02/18/13 02:04 PM (12 years ago)
Hi @raveyd, have managed to get android push working on the buzztouch host and documented it. I just got my self hosted working, c/o David changing something so that curl now works with my host, so I'll try the same thing on my self hosted and report back. Alan
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
02/18/13 02:11 PM (12 years ago)
Thanks Alan! I followed your documentation. Like I say, everything appears to be working, except there's nothing happening in my control panel. I suspect cURL is the issue with mine too.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
02/18/13 02:16 PM (12 years ago)
Did you try a test app on the buzztouch.com panel?
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
02/18/13 02:19 PM (12 years ago)
Never thought of that, haven't looked in there for over 12 months. I'll get on to it now, thanks!
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
02/18/13 02:23 PM (12 years ago)
On my self hosted, I couldn't download an app until curl was sorted, so I tried on my buzztouch.com, just to familiarise. On the self hosted, I think if curl doesn't work, you see errors. I have seen several recent threads on push not working, I suspect not all all the answers are out there yet.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
02/18/13 03:55 PM (12 years ago)
No luck on bt either... I must be missing something.. If you don't mind taking a look Alan, do these screenshots look ok to you? https://dl.dropbox.com/u/56760890/pushes.png
 
Rishav
Code is Art
Profile
Posts: 153
Reg: Jan 26, 2012
Dubai
8,780
like
02/18/13 07:53 PM (12 years ago)
I suppose you require a server key rather then a android apps key..I got my push working with the serverkey only..So try creating new server key and using that.....
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
02/19/13 05:42 AM (12 years ago)
Hi @Rishav, I've tried android, server and browser keys on self hosted and the android key on bt because that was in Alan's guide, but still nothing... I'll try the server and browser keys in bt too, thanks.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
02/19/13 06:43 AM (12 years ago)
Still nothing.. might have stumbled onto a potential bug, David contacted..
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
02/19/13 07:43 AM (12 years ago)
Got it, finally!! (I think..) The string builder in BT_gcmServerUtils.java doesn't appear to handle white spaces in the deviceModel name. In the case of the phone I was testing on, 'HTC One X' breaks the string at the first space. Just tried on a device with no white spaces in the deviceModel name (acer-G100W) and it works fine.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
02/19/13 01:06 PM (12 years ago)
Never had a chance to get near a computer today, but glad you sussed it out
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
02/19/13 01:17 PM (12 years ago)
Not as glad as me Alan! Thanks for your input, and Rishav, appreciated.
 

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.