Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 26    Views: 228

thegibcoyote
Apple Fan
Profile
Posts: 139
Reg: Feb 01, 2011
Gibraltar
1,390
03/02/14 12:26 PM (10 years ago)

Push Notification in self hosted showing as Null

I have created a new test app in my Self Hosted BT 3.0 environment linked with push certificates etc My config file is correctly registered as follows "currentMode":"Live", "startLocationUpdates":"1", "promptForPushNotifications":"1", However in the BT Self Hosted Screen for Push Notification Devices I see my device appearing with Mode null Anyone any ideas why this is the case ? Thanks Alan
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/02/14 01:40 PM (10 years ago)
This is a known issue we're working on.
 
Adam
Aspiring developer
Profile
Posts: 247
Reg: Oct 23, 2010
Southern Califo...
4,470
like
03/02/14 06:27 PM (10 years ago)
Switch to Parse. It is really easy to set up. Adam
 
@rob
Code is Art
Profile
Posts: 115
Reg: Dec 10, 2013
Alabama
8,800
like
03/02/14 09:05 PM (10 years ago)
@thegibcoyote I circumvented that problem by going into my MySQL database and changing null to live, which then allows me to send push messages but the message still causes the app to crash so I believe the "null" is just one of many bugs in the built in BT Push right now. @Adam I have played with Parse until my fingers bleed and still cannot get it to work. I have followed @feraco docs: https://docs.google.com/file/d/0B1LLiM88XN8wT0RTcXRYenlHUzg/edit?pli=1 If the app is running and I send a Push, the message arrives perfectly but then the app crashes. If the app is not running and I sent a push, the device vibrates and makes a sound but no message comes through. Any hints would be greatly appreciated. I will paste the logcat errors below: 03-02 21:53:38.706: V/GCMBroadcastReceiver(11930): onReceive: com.google.android.c2dm.intent.RECEIVE 03-02 21:53:38.707: V/GCMBroadcastReceiver(11930): GCM IntentService class: com.wvcdroid.BT_gcmIntentService 03-02 21:53:38.707: V/GCMBaseIntentService(11930): Acquiring wakelock 03-02 21:53:38.711: V/GCMBaseIntentService(11930): Intent service name: GCMIntentService-YOUR_GOOGLE_GCM_PROJECT_NUMBER-2 03-02 21:53:38.711: W/ZZ(11930): BT_gcmIntentService:CONSTRUCTOR Google GCM Project ID: YOUR_GOOGLE_GCM_PROJECT_NUMBER 03-02 21:53:38.715: W/ZZ(11930): BT_gcmIntentService:onMessage notification: null 03-02 21:53:38.717: W/ZZ(11930): BT_gcmIntentService:generateNotification Message: null 03-02 21:53:38.719: E/com.parse.ParseNotificationManager(11930): Icon id 2130837722 is not a valid drawable. Trying to fall back to default app icon. 03-02 21:53:38.722: V/GCMBaseIntentService(11930): Releasing wakelock 03-02 21:53:38.723: W/dalvikvm(11930): threadid=19: thread exiting with uncaught exception (group=0x41679d28) 03-02 21:53:38.726: E/AndroidRuntime(11930): FATAL EXCEPTION: IntentService[GCMIntentService-YOUR_GOOGLE_GCM_PROJECT_NUMBER-2] 03-02 21:53:38.726: E/AndroidRuntime(11930): Process: com.wvcdroid, PID: 11930 03-02 21:53:38.726: E/AndroidRuntime(11930): java.lang.IllegalMonitorStateException: object not locked by thread before notify() 03-02 21:53:38.726: E/AndroidRuntime(11930): at java.lang.Object.notify(Native Method) 03-02 21:53:38.726: E/AndroidRuntime(11930): at com.wvcdroid.BT_gcmIntentService.generateNotification(BT_gcmIntentService.java:152) 03-02 21:53:38.726: E/AndroidRuntime(11930): at com.wvcdroid.BT_gcmIntentService.onMessage(BT_gcmIntentService.java:89) 03-02 21:53:38.726: E/AndroidRuntime(11930): at com.google.android.gcm.GCMBaseIntentService.onHandleIntent(GCMBaseIntentService.java:223) 03-02 21:53:38.726: E/AndroidRuntime(11930): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) 03-02 21:53:38.726: E/AndroidRuntime(11930): at android.os.Handler.dispatchMessage(Handler.java:102) 03-02 21:53:38.726: E/AndroidRuntime(11930): at android.os.Looper.loop(Looper.java:137) 03-02 21:53:38.726: E/AndroidRuntime(11930): at android.os.HandlerThread.run(HandlerThread.java:61)
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/03/14 03:19 AM (10 years ago)
Parse doesn't play well with Buzztouch. It makes the app crash when the app is offline. If you can't sort out this issue and need an alternative I recommend Pushwhoosh.com which is a breeze to install and works well. Farcat
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
03/03/14 08:18 AM (10 years ago)
You can also explore Amazon's push notification service. 1 million free pushes per month. I have not yet tried it.
 
thegibcoyote
Apple Fan
Profile
Posts: 139
Reg: Feb 01, 2011
Gibraltar
1,390
like
03/03/14 08:32 AM (10 years ago)
chris1 I have sent you a private message ref APP Copy can you please reply ? Thanks
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/03/14 08:41 AM (10 years ago)
I replied yesterday. Did you not get it?
 
thegibcoyote
Apple Fan
Profile
Posts: 139
Reg: Feb 01, 2011
Gibraltar
1,390
like
03/03/14 08:42 AM (10 years ago)
Chris1 I have not got it sorry to hear he he Can you send to my email address [email protected] ? Await your contact thanks mate
 
thegibcoyote
Apple Fan
Profile
Posts: 139
Reg: Feb 01, 2011
Gibraltar
1,390
like
03/03/14 09:16 AM (10 years ago)
Chris1 have you sent email, have not received anything mate. Need to sort out the issue with the purchase asap thanks mate
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/03/14 09:59 AM (10 years ago)
Sounds like you got the message.
 
thegibcoyote
Apple Fan
Profile
Posts: 139
Reg: Feb 01, 2011
Gibraltar
1,390
like
03/03/14 10:01 AM (10 years ago)
Yep I did many thanks and already got my APP on Self Hosted. Looks awesome man. Well Done ! Very good to create a backup for sure.
 
epicweb
Aspiring developer
Profile
Posts: 159
Reg: Aug 30, 2012
Glen Carbon
4,990
like
03/04/14 06:42 AM (10 years ago)
@farcat Can you confirm if the Parse crashing is new to 3.0? I was just getting ready to update my app.
 
@rob
Code is Art
Profile
Posts: 115
Reg: Dec 10, 2013
Alabama
8,800
like
03/04/14 07:00 AM (10 years ago)
@epicweb not sure if it is new or not as I never installed it before now, but I can confirm that it does crash my app in BTv3 Self Hosted. If the app is open, the message will show up but it crashes the app. If the app is closed, the device will vibrate and make a notification sound but the message never shows up and you get a message that the app crashed (even though it is not running). Several people claim to have it running successfully, but i have tinkered with it until my eyes bleed and cannot make it work.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/04/14 07:05 AM (10 years ago)
@epicweb, yes most definitely. There are a couple of threads about it, other users observed the same thing. It works but as soon as the device goes offline the crashes on launch. I contacted Parse and they told me that it was to do with BT code.
 
epicweb
Aspiring developer
Profile
Posts: 159
Reg: Aug 30, 2012
Glen Carbon
4,990
like
03/04/14 07:09 AM (10 years ago)
Thank you for the reply @rob. This is very disappointing because parse is so much easier to use for Push Notification with Buzztouch apps in the past. There goes my idea of using the parse channels.
 
@rob
Code is Art
Profile
Posts: 115
Reg: Dec 10, 2013
Alabama
8,800
like
03/04/14 07:12 AM (10 years ago)
@epicweb I have played with Amazon Push a little but haven't been able to get it fully implemented yet. I hope there is a solution coming soon, as Push is a high priority for a lot of us.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/04/14 07:15 AM (10 years ago)
@epicweb, try pushwhosh, it's fairly easy to implement (and better in my view).
 
@rob
Code is Art
Profile
Posts: 115
Reg: Dec 10, 2013
Alabama
8,800
like
03/04/14 07:17 AM (10 years ago)
@farcat do you have any docs on implementing pushwhosh in BT apps? Thx Rob
 
epicweb
Aspiring developer
Profile
Posts: 159
Reg: Aug 30, 2012
Glen Carbon
4,990
like
03/04/14 07:23 AM (10 years ago)
I like the idea of the pushwhosh wordpress plugin. Very nice. Parse has one that works well. Have you used that?
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/04/14 07:27 AM (10 years ago)
I followed the instructions that they provide when you download the SDK. It's pretty much the same principle as Parse re the Apple certificates and all. It was a while ago but PM me if you are stuck. Cheers, Farcat
 
@rob
Code is Art
Profile
Posts: 115
Reg: Dec 10, 2013
Alabama
8,800
like
03/04/14 07:28 AM (10 years ago)
@farcat Ok, I was specefically working on a Android app right now, have you only used in on iOS apps?
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/04/14 07:31 AM (10 years ago)
I haven't used the worpress plugin. The option I use is their Rich HTML page thingy. It allows you to push a HTML rich page (or image or link) which is pretty cool. Didn't know Parse had something similar. They were such a headache for me that I kinda erased them from my mind...
 
epicweb
Aspiring developer
Profile
Posts: 159
Reg: Aug 30, 2012
Glen Carbon
4,990
like
03/04/14 07:34 AM (10 years ago)
yeah its nice to use the wordpress plugin because you can have the content posted on your website at the same time you send the push. You can then use json or the RSS to have the post show up on the app. Helps prevent double posting or even triple posting the same news.
 
farcat
buzztouch Evangelist
Profile
Posts: 1008
Reg: Jan 27, 2012
France
13,230
like
03/04/14 07:41 AM (10 years ago)
@rob, yes only IOS for now. Haven't had a chance on Android yet. @epicweb, the plugin does sound sweet :)
 
thegibcoyote
Apple Fan
Profile
Posts: 139
Reg: Feb 01, 2011
Gibraltar
1,390
like
03/26/14 11:21 PM (10 years ago)
Anyone know how to get round the issue of new APP version I have released on BT 3.0 is showing all registered devices as n/a this is a big issue as I am not allowed to send Push notifications to these devices from BT Control panel. Would really love to get an answer if someone has found a fix, now I have a new version of my APP that no longer supports push. Alan
 
RonBo
buzztouch Evangelist
Profile
Posts: 167
Reg: Feb 26, 2012
Raleigh, NC
5,220
like
05/15/14 07:12 PM (10 years ago)
I had the problem of all registered devices as n/a, and here's what fixed it for me. I had everything set as above, but had overlooked one step: from your BT3.0 Control Panel, Core Properties, Push Notifications Settings, set to Yes and Save. I figured, I'm good to go...but same thing, still registered as N/A. Then, I realized I had not recompiled. But I didn't want to bring over all new compiled code, as i've been doing tons of edits in xcode. So I used DIFFMERGE to compare the old/new copies of BT_application.m, and it clearly shows the new code that saving Push Notificaiton Setings = YES adds in. I just dragged over that new single file from the new package, and voila, my devices came in fine, and Push worked! Hope this helps
 

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.