Discussion Forums  >  iOS / Android Beta Testers

Replies: 14    Views: 111

daku7
Aspiring developer
Profile
Posts: 227
Reg: Oct 30, 2011
Toronto
3,170
03/12/13 10:54 AM (11 years ago)

No registered devices

I had followed below pdf file to enable push notifications for my android apps. https://www.buzztouch.com/files/howtos/HowToAndroidPushWithGCMForBuzzTouchPush.pdf right now my app is on google play and i have install app into 2 devices but still now my push screen shows no device. Kindly give me a solution.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/12/13 11:07 AM (11 years ago)
Hi @daku7, What kind of devices are these? There appears to be a bug where if a device that has a device name with a space in it, like my Nexus 7, it won't register because the space breaks the string that gets used for registration. I'm not entirely sure how to check what the device name is that's getting passed to the code, but it could be the problem. Also...the user has to be logged into Google on the device in order to register for push. Did you test this first on an emulator or real device? Mark
 
HerrNathan
Aspiring developer
Profile
Posts: 73
Reg: Oct 11, 2011
Stirling
5,830
like
03/12/13 11:12 AM (11 years ago)
@daku7, I'm in the same position as yourself - I think the problem I'm having is exactly as @GoNorthWest suggested with the device name If you check the logcat once you click yes you'll see what is happening with the device Heres the error I have 03-12 18:10:34.928: W/ZZ(12922): BT_gcmServerUtils:gcmServerPOST EXCEPTION with String Builder: java.lang.IllegalArgumentException: Illegal character in query at index 240: <a href="http://DOMAINNAME/api/app/?command=registerForPush&appGuid=XXXXXXXX&apiKey=XXXXXX&apiSecret=XXXXXX&deviceId=1111111111&deviceLatitude=&deviceLongitude=&deviceModel=orange_uk-HTC" target="_blank" rel="nofollow">http://DOMAINNAME/api/app/?command=registerForPush&appGuid=XXXXXX&apiKey=XXXXXX&apiSecret=XXXXXX&deviceId=1111111111&deviceLatitude=&deviceLongitude=&deviceModel=orange_uk-HTC</a> Desire&userId= 03-12 18:10:34.928: W/ZZ(12922): BT_gcmServerUtils:gcmServerPOST The server did not return a result? The error seems to be caused by the fact the device is called orange_uk-HTC Desire I've tried editing the code to replace the spaces in the userId using replaceALL but cant seem to get it to work but as far as I know its been reported and I'm sure they are looking into
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/12/13 11:18 AM (11 years ago)
You can edit the Register Device URL in your Core Settings for Push Notifications and remove the &deviceModel field if you wish. The downside is you won't be able to see what types of devices register, but that may or may not be important to you. Mark
 
HerrNathan
Aspiring developer
Profile
Posts: 73
Reg: Oct 11, 2011
Stirling
5,830
like
03/12/13 11:23 AM (11 years ago)
Hi Mark, Didn't even give that a thought. I did try to edit the php at my server side to remove the whitespaces once it reached the server but that doesn't seem to stop the error in the app. I'm going to try and remove the device model field then at least I'll be able to confirm I have it working. Thanks again!
 
daku7
Aspiring developer
Profile
Posts: 227
Reg: Oct 30, 2011
Toronto
3,170
like
03/12/13 11:28 AM (11 years ago)
hi GoNorthWest, Thank you for your update, Right now 2 devices are showed but clicking send it shows error or sending in progress. why it happens?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/12/13 11:31 AM (11 years ago)
Why you're getting those errors I'm not quite sure. Perhaps somebody else has seen it? I do see that you're specifying a badge number, which is for iOS only. Maybe that's causing an error?
 
HerrNathan
Aspiring developer
Profile
Posts: 73
Reg: Oct 11, 2011
Stirling
5,830
like
03/12/13 11:32 AM (11 years ago)
Outstanding advice Mark! Have got it working now. @daku7 - sounds like the same problem, hopefully the above advice sorts you out.
 
daku7
Aspiring developer
Profile
Posts: 227
Reg: Oct 30, 2011
Toronto
3,170
like
03/12/13 11:34 AM (11 years ago)
No i have also try without badge number at the time also shows error. Created: 03/12/13 02:32 PM Payload: {"apps":{"alert":"Android test", "badge":0, "sound":"default"}} Send To: 0 iOS devices 2 Android devices
 
HerrNathan
Aspiring developer
Profile
Posts: 73
Reg: Oct 11, 2011
Stirling
5,830
like
03/12/13 11:37 AM (11 years ago)
@daku7 - I've managed to get it working now. What version of BT are you using?
 
HerrNathan
Aspiring developer
Profile
Posts: 73
Reg: Oct 11, 2011
Stirling
5,830
like
03/12/13 11:38 AM (11 years ago)
also, remember ports 5228, 5229 and 5230 have to be open.
 
daku7
Aspiring developer
Profile
Posts: 227
Reg: Oct 30, 2011
Toronto
3,170
like
03/12/13 11:38 AM (11 years ago)
@HerrNathan - I am using self-hosted v2.8
 
daku7
Aspiring developer
Profile
Posts: 227
Reg: Oct 30, 2011
Toronto
3,170
like
03/12/13 11:42 AM (11 years ago)
i am using Godaddy server. I think this 5228, 5229 and 5230 ports are always open.
 
HerrNathan
Aspiring developer
Profile
Posts: 73
Reg: Oct 11, 2011
Stirling
5,830
like
03/12/13 11:47 AM (11 years ago)
@daku7 - I'd double check with them to be sure. I've read some of the previous threads and this seems to be different for each server. Maybe best to confirm, will narrow down the likely cause at least
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
03/12/13 02:05 PM (11 years ago)
I have a suggestion - if you are not sure about your hosted solution working with push, consider knocking together a quick test app on your BT hosted control panel, as we know that push works from there. Good luck, 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.