Chris from Stafford
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
01/01/14 10:41 AM (11 years ago)

Android Push

I have set up push notifications in Android but my app crashes as soon as I accept on my device. I have checked the SDK and it says Google Cloud Messaging for Android is deprecated. The standalone version is no longer supported and the libs are now in google play services (which I have installed) I guess the buzztouch control panel may be not up to date - is there a fix for this?
 
Rishav
Code is Art
Profile
Posts: 153
Reg: Jan 26, 2012
Dubai
8,780
like
01/02/14 03:32 AM (11 years ago)
This might work. In BT_gcmIntentService.java try changing notificationManager.notify(); to notificationManager.notify(1, builder.build());
 
hasher13
Android Fan
Profile
Posts: 376
Reg: Jul 21, 2012
Wethersfield
8,060
like
01/02/14 07:47 AM (11 years ago)
I tried it and get the error, "the method build ()is undefined for the type notification.builder" Thank you, Howard
 
Rishav
Code is Art
Profile
Posts: 153
Reg: Jan 26, 2012
Dubai
8,780
like
01/03/14 02:53 AM (11 years ago)
Which Google Api version are you using. The code i posted required you to use api 16 or above.
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
01/03/14 07:43 AM (11 years ago)
I'm api 14 or above
 
hasher13
Android Fan
Profile
Posts: 376
Reg: Jul 21, 2012
Wethersfield
8,060
like
01/03/14 10:45 AM (11 years ago)
@Rishav I am at 14 aswell @Chris, did you get the same error? Thanks, Howard
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
01/03/14 12:13 PM (11 years ago)
yes didnt work for me
 

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.