Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 17    Views: 357

Masons App Design
Aspiring developer
Profile
Posts: 206
Reg: Aug 06, 2013
Andrews, TX
12,660
03/17/14 09:56 AM (10 years ago)

BT Push Update?

I have been reading in the forum abotu BT push notifications casuing apps to stop working. I am not self hosted and use the BT control and have my push notifications setup and am having this same issue. When the message is sent the app stops working. Has there been any update to a solution for this?
 
Patrickmotox
Aspiring developer
Profile
Posts: 89
Reg: Dec 10, 2013
Cameron Park, C...
7,090
like
03/21/14 01:40 PM (10 years ago)
Here is what I found. The code is not correct. Do this and it should work. In the BT_gcmConfig.java I commented out all the code that "tries" to get the google server api key. see (String tmpGcmNumber = "129905444818";) below. I just put the key in there . Now it registers no problem. //get GCM Project Number from AndroidManifest.xml... public static String getGCMProjectNumber(){ //get the googleAPIProjectNumber from the AndroidManifest.xml file... ApplicationInfo ai = null; String tmpGcmNumber = "129905444818"; comment out or remove everything below, except the return tmpGcmNumber; //try{ // ai = //connections_appDelegate.getApplication().getPackageManager().getApplicationInfo(connections_appDelegate.getApplication().getPackageName(), PackageManager.GET_META_DATA); // tmpGcmNumber = (String)ai.metaData.get("googleCloudMessagingProjectNumber"); // BT_debugger.showIt(CLASS_NAME + ":getGCMProjectNumber. Using Google GCM Project Number in AndroidManifest: \"" + tmpGcmNumber + "\""); // }catch(NameNotFoundException e) { // BT_debugger.showIt(CLASS_NAME + ":getGCMProjectNumber. EXCEPTION. Google GCM Project Number not found in AndroidManifest?"); // } //retuan... return tmpGcmNumber; } Clean... it looks like this. //get GCM Project Number from AndroidManifest.xml... public static String getGCMProjectNumber(){ //get the googleAPIProjectNumber from the AndroidManifest.xml file... String tmpGcmNumber = "129905444818"; return tmpGcmNumber; } Now the code that is killing the app, and to get the message to show in the notification window. in BT_gcmIntentService.java change to this. You are just adding a couple of things and removing the last notify. int icon = R.drawable.icon; long when = System.currentTimeMillis(); <------- add this line in. NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); //title of message... String title = context.getString(R.string.app_name); //messages show in the built in notification center... Intent notificationIntent = new Intent(context, BT_activity_host.class); Notification.Builder builder = new Notification.Builder(connections_appDelegate.getContext()); Notification notification = new Notification(icon, message, when); <----- add icon, message, when, in the brackets of this line. //flag so intent does not start a new activity... notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent intent = PendingIntent.getActivity(context, 0, notificationIntent, 0); //below line is new notification.setLatestEventInfo(context, title, message, intent); notification.flags |= Notification.FLAG_AUTO_CANCEL; //play sound for notification... notification.defaults |= Notification.DEFAULT_SOUND; //vibrate if enabled... notification.defaults |= Notification.DEFAULT_VIBRATE; //finish builder... builder.setContentIntent(intent); builder.setSmallIcon(icon); builder.setAutoCancel(false); builder.setContentTitle(title); builder.setContentText(message); notificationManager.notify(0, notification); //notify... notificationManager.notify(); <------ remove this. It is redundant and crashes the app. } Once I had made these changes it worked great on my tablet and phone.
 
Masons App Design
Aspiring developer
Profile
Posts: 206
Reg: Aug 06, 2013
Andrews, TX
12,660
like
03/21/14 02:00 PM (10 years ago)
Awesome thank you I will give it a try.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
03/21/14 04:03 PM (10 years ago)
Nice work Patrick. Masons -- please let us know how it works for you
 
Masons App Design
Aspiring developer
Profile
Posts: 206
Reg: Aug 06, 2013
Andrews, TX
12,660
like
03/22/14 12:27 PM (10 years ago)
ATTENTION!!!! @Patrickmotox solution solved the problem for android push through BT hosted. I have not tried on apple yet. Thank you @Patrickmotox for the help I will make an announcement with this thread so others can see as well. I greatly appreciate it!!!!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/22/14 02:42 PM (10 years ago)
Sweet, Nice going, Patrick! :) Cheers! -- Smug
 
Lex
Aspiring developer
Profile
Posts: 29
Reg: Dec 25, 2013
Ecuador
2,840
like
03/31/14 02:15 PM (10 years ago)
Hi.. thanks for this tip... i followed the insructions now my devices is registerd. but when i send a notification nothing happend! Logcat don't report anything..the phone don't sound, vibrate or show nothing.. maybe some aidea?
 
Worker73
Android Fan
Profile
Posts: 419
Reg: Feb 06, 2012
Austria, Klagen...
4,490
like
04/06/14 03:59 AM (10 years ago)
App crahes when i send an PushMessage from ControlPanel *snief* Any Idea?
 
Moto110
Aspiring developer
Profile
Posts: 205
Reg: Jul 26, 2011
Orlando, FL
8,700
like
05/16/14 07:23 AM (10 years ago)
@Lex - I think I have the solution to your problem. I also have the same problem with the device no longer crashing, BUT notification were not showing up. Here is what I originally did that did not completely fix the problem. I made changes to the BT_gcmConfig.java and also the BT_gcmIntentService.java files that Patrickmotox suggested. However, in the BT_gcmIntentService.java file I only went through the code and added or removed his suggestions and did not completely replace the code with what he posted above. This fix the app from crashing, BUT not display the notification. I was able to get notification to start working. when I completely replaced the code in the BT_gcmIntentService.java with what Patrickmotox posted above. Starting at >>> int icon = R.drawable.icon; Ending at >>> } You should have two curly braces at the bottom of the code like this when done. } } I then when back into the code I had just pasted and removed the notes that Patrickmotox made tell us to add something or remove something as well as entering my app name on this line. Notification.Builder builder = new Notification.Builder(APPNAME GOES HERE_appDelegate.getContext()); After all of that GCM notification started working and displaying on the test device. Hopefully I haven't confused anyone with this. If you have any questions post here and I will try to answer them as soon as possible. THANKS @Patrickmotox for the original info it SAVED me a LOT of time!!!!
 
yuri737
Aspiring developer
Profile
Posts: 25
Reg: Apr 12, 2013
Kirov, Kirovska...
4,100
like
05/19/14 11:21 AM (10 years ago)
Hello! Somebody tell me what else you want to add to the code? Thank you for your help. package com.sportprognoz; import static com.sportprognoz.BT_gcmConfig.SENDER_ID; import static com.sportprognoz.BT_gcmConfig.displayMessage; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import com.google.android.gcm.GCMBaseIntentService; public class BT_gcmIntentService extends GCMBaseIntentService { //this class handles Google Cloud Messaging Services... static final String serviceName = "BT_gcmIntentService"; static final String googleAPIProjectId = BT_gcmConfig.SENDER_ID; //constructor needs Google Project Id for this GCM Project (comes from GCM website, API key screen)... public BT_gcmIntentService(){ super(SENDER_ID); BT_debugger.showIt(serviceName + ":CONSTRUCTOR Google GCM Project ID: " + SENDER_ID); } //onRegistered... @Override protected void onRegistered(Context context, String registrationId) { BT_debugger.showIt(serviceName + ":onRegistered Registration ID: " + registrationId); displayMessage(context, "Device registered for Push Notifications"); sportprognoz_appDelegate.rootApp.setPushRegistrationId(registrationId); BT_gcmServerUtils.gcmRegisterOnServer(context, registrationId); } //onUnRegistered... @Override protected void onUnregistered(Context context, String registrationId) { BT_debugger.showIt(serviceName + ":onUnregistered Registration ID: " + registrationId); displayMessage(context, "Device un-registered for Push Notifications"); sportprognoz_appDelegate.rootApp.setPushRegistrationId(""); BT_gcmServerUtils.gcmUnregisterOnServer(context, registrationId); } //onMessage... @Override protected void onMessage(Context context, Intent intent) { //get the message... String message = intent.getExtras().getString("message"); //log... BT_debugger.showIt(serviceName + ":onMessage notification: " + message); //display notification on current screen of app... displayMessage(context, message); //notify user in built in Android notificstion bar... generateNotification(context, message); } //onDeletedMessages... @Override protected void onDeletedMessages(Context context, int total) { BT_debugger.showIt(serviceName + ":onDeletedMessages notification Deleted Count: " + total); //Called when the GCM server tells pending messages have been deleted because the device was idle. } //onError... @Override public void onError(Context context, String errorId) { BT_debugger.showIt(serviceName + ":onError notification: " + errorId); displayMessage(context, "There was a problem communicating with the Google Cloud Messaging system. Is the device online? Is the device logged into a Google Account?"); } //onRecoverableError... @Override protected boolean onRecoverableError(Context context, String errorId) { BT_debugger.showIt(serviceName + ":onRecoverableError notification: " + errorId); displayMessage(context, "There was a problem communicating with the Google Cloud Messaging system. Is the device online? Is the device logged into a Google Account?"); return super.onRecoverableError(context, errorId); } //generates actual notification... private static void generateNotification(Context context, String message) { BT_debugger.showIt(serviceName + ":generateNotification Message: " + message); int icon = R.drawable.icon; long when = System.currentTimeMillis(); //title of message... String title = context.getString(R.string.app_name); //messages show in the built in notification center... Intent notificationIntent = new Intent(context, BT_activity_host.class); NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); Notification.Builder builder = new Notification.Builder(sportprognoz_appDelegate.getContext()); Notification notification = new Notification(); //flag so intent does not start a new activity... notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent intent = PendingIntent.getActivity(context, 0, notificationIntent, 0); //below line is new notification.setLatestEventInfo(context, title, message, intent); notification.flags |= Notification.FLAG_AUTO_CANCEL; //play sound for notification... notification.defaults |= Notification.DEFAULT_SOUND; //vibrate if enabled... notification.defaults |= Notification.DEFAULT_VIBRATE; //finish builder... builder.setContentIntent(intent); builder.setSmallIcon(icon); builder.setAutoCancel(false); builder.setContentTitle(title); builder.setContentText(message); } }
 
Moto110
Aspiring developer
Profile
Posts: 205
Reg: Jul 26, 2011
Orlando, FL
8,700
like
05/19/14 11:32 AM (10 years ago)
Make sure that you make the change to the BT_gcmConfig.java posted by Patrickmotox (second post). The code below should take care of the BT_gcmIntentService.java file: package com.sportprognoz; import static com.sportprognoz.BT_gcmConfig.SENDER_ID; import static com.sportprognoz.BT_gcmConfig.displayMessage; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import com.google.android.gcm.GCMBaseIntentService; public class BT_gcmIntentService extends GCMBaseIntentService { //this class handles Google Cloud Messaging Services... static final String serviceName = "BT_gcmIntentService"; static final String googleAPIProjectId = BT_gcmConfig.SENDER_ID; //constructor needs Google Project Id for this GCM Project (comes from GCM website, API key screen)... public BT_gcmIntentService(){ super(SENDER_ID); BT_debugger.showIt(serviceName + ":CONSTRUCTOR Google GCM Project ID: " + SENDER_ID); } //onRegistered... @Override protected void onRegistered(Context context, String registrationId) { BT_debugger.showIt(serviceName + ":onRegistered Registration ID: " + registrationId); displayMessage(context, "Device registered for Push Notifications"); sportprognoz_appDelegate.rootApp.setPushRegistrationId(registrationId); BT_gcmServerUtils.gcmRegisterOnServer(context, registrationId); } //onUnRegistered... @Override protected void onUnregistered(Context context, String registrationId) { BT_debugger.showIt(serviceName + ":onUnregistered Registration ID: " + registrationId); displayMessage(context, "Device un-registered for Push Notifications"); sportprognoz_appDelegate.rootApp.setPushRegistrationId(""); BT_gcmServerUtils.gcmUnregisterOnServer(context, registrationId); } //onMessage... @Override protected void onMessage(Context context, Intent intent) { //get the message... String message = intent.getExtras().getString("message"); //log... BT_debugger.showIt(serviceName + ":onMessage notification: " + message); //display notification on current screen of app... displayMessage(context, message); //notify user in built in Android notificstion bar... generateNotification(context, message); } //onDeletedMessages... @Override protected void onDeletedMessages(Context context, int total) { BT_debugger.showIt(serviceName + ":onDeletedMessages notification Deleted Count: " + total); //Called when the GCM server tells pending messages have been deleted because the device was idle. } //onError... @Override public void onError(Context context, String errorId) { BT_debugger.showIt(serviceName + ":onError notification: " + errorId); displayMessage(context, "There was a problem communicating with the Google Cloud Messaging system. Is the device online? Is the device logged into a Google Account?"); } //onRecoverableError... @Override protected boolean onRecoverableError(Context context, String errorId) { BT_debugger.showIt(serviceName + ":onRecoverableError notification: " + errorId); displayMessage(context, "There was a problem communicating with the Google Cloud Messaging system. Is the device online? Is the device logged into a Google Account?"); return super.onRecoverableError(context, errorId); } //generates actual notification... private static void generateNotification(Context context, String message) { BT_debugger.showIt(serviceName + ":generateNotification Message: " + message); int icon = R.drawable.icon; long when = System.currentTimeMillis(); NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); //title of message... String title = context.getString(R.string.app_name); //messages show in the built in notification center... Intent notificationIntent = new Intent(context, BT_activity_host.class); Notification.Builder builder = new Notification.Builder(sportprognoz_appDelegate.getContext()); Notification notification = new Notification(icon, message, when); //flag so intent does not start a new activity... notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent intent = PendingIntent.getActivity(context, 0, notificationIntent, 0); //below line is new notification.setLatestEventInfo(context, title, message, intent); notification.flags |= Notification.FLAG_AUTO_CANCEL; //play sound for notification... notification.defaults |= Notification.DEFAULT_SOUND; //vibrate if enabled... notification.defaults |= Notification.DEFAULT_VIBRATE; //finish builder... builder.setContentIntent(intent); builder.setSmallIcon(icon); builder.setAutoCancel(false); builder.setContentTitle(title); builder.setContentText(message); notificationManager.notify(0, notification); //notify... } }
 
yuri737
Aspiring developer
Profile
Posts: 25
Reg: Apr 12, 2013
Kirov, Kirovska...
4,100
like
05/20/14 09:36 AM (10 years ago)
Thank you all for your help!
 
yuri737
Aspiring developer
Profile
Posts: 25
Reg: Apr 12, 2013
Kirov, Kirovska...
4,100
like
05/20/14 11:46 AM (10 years ago)
Thank you very much for your help!  Moto110, Patrick thanks! Code set in BT_gcmIntentService.java: no errors and no warnings! Very happy! code BT_gcmIntentService.java: package com.sportprognoz; import static com.sportprognoz.BT_gcmConfig.SENDER_ID; import static com.sportprognoz.BT_gcmConfig.displayMessage; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import com.google.android.gcm.GCMBaseIntentService; public class BT_gcmIntentService extends GCMBaseIntentService { / / This class handles Google Cloud Messaging Services ... static final String serviceName = "BT_gcmIntentService"; static final String googleAPIProjectId = BT_gcmConfig.SENDER_ID; / / Constructor needs Google Project Id for this GCM Project (comes from GCM website, API key screen) ... public BT_gcmIntentService () { super (SENDER_ID); BT_debugger.showIt (serviceName + ": CONSTRUCTOR Google GCM Project ID:" + SENDER_ID); } / / OnRegistered ... @ Override protected void onRegistered (Context context, String registrationId) { BT_debugger.showIt (serviceName + ": onRegistered Registration ID:" + registrationId); displayMessage (context, "Device registered for Push Notifications"); sportprognoz_appDelegate.rootApp.setPushRegistrationId (registrationId); BT_gcmServerUtils.gcmRegisterOnServer (context, registrationId); } / / OnUnRegistered ... @ Override protected void onUnregistered (Context context, String registrationId) { BT_debugger.showIt (serviceName + ": onUnregistered Registration ID:" + registrationId); displayMessage (context, "Device un-registered for Push Notifications"); sportprognoz_appDelegate.rootApp.setPushRegistrationId (""); BT_gcmServerUtils.gcmUnregisterOnServer (context, registrationId); } / / OnMessage ... @ Override protected void onMessage (Context context, Intent intent) { / / Get the message ... String message = intent.getExtras (). GetString ("message"); / / Log ... BT_debugger.showIt (serviceName + ": onMessage notification:" + message); / / Display notification on current screen of app ... displayMessage (context, message); / / Notify user in built in Android notificstion bar ... generateNotification (context, message); } / / OnDeletedMessages ... @ Override protected void onDeletedMessages (Context context, int total) { BT_debugger.showIt (serviceName + ": onDeletedMessages notification Deleted Count:" + total); / / Called when the GCM server tells pending messages have been deleted because the device was idle. } / / OnError ... @ Override public void onError (Context context, String errorId) { BT_debugger.showIt (serviceName + ": onError notification:" + errorId); displayMessage (context, "There was a problem communicating with the Google Cloud Messaging system. Is the device online? Is the device logged into a Google Account?"); } / / OnRecoverableError ... @ Override protected boolean onRecoverableError (Context context, String errorId) { BT_debugger.showIt (serviceName + ": onRecoverableError notification:" + errorId); displayMessage (context, "There was a problem communicating with the Google Cloud Messaging system. Is the device online? Is the device logged into a Google Account?"); return super.onRecoverableError (context, errorId); } / / Generates actual notification ... private static void generateNotification (Context context, String message) { BT_debugger.showIt (serviceName + ": generateNotification Message:" + message); int icon = R.drawable.icon; long when = System.currentTimeMillis (); NotificationManager notificationManager = (NotificationManager) context.getSystemService (Context.NOTIFICATION_SERVICE); / / Title of message ... String title = context.getString (R.string.app_name); / / Messages show in the built in notification center ... Intent notificationIntent = new Intent (context, BT_activity_host.class); Notification.Builder builder = new Notification.Builder (sportprognoz_appDelegate.getContext ()); Notification notification = new Notification (icon, message, when); / / Flag so intent does not start a new activity ... notificationIntent.setFlags (Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent intent = PendingIntent.getActivity (context, 0, notificationIntent, 0); / / Below line is new notification.setLatestEventInfo (context, title, message, intent); notification.flags | = Notification.FLAG_AUTO_CANCEL; / / Play sound for notification ... notification.defaults | = Notification.DEFAULT_SOUND; / / Vibrate if enabled ... notification.defaults | = Notification.DEFAULT_VIBRATE; / / Finish builder ... builder.setContentIntent (intent); builder.setSmallIcon (icon); builder.setAutoCancel (false); builder.setContentTitle (title); builder.setContentText (message); notificationManager.notify (0, notification); / / Notify ... } } Only file BT_gcmConfig.yava shows 3 warnings Description Resource Path Location a Type The import android.content.pm.PackageManager.NameNotFoundException is never used BT_gcmConfig.java / sportprognoz / src / com / sportprognoz line 39 Java Problem The import android.content.pm.PackageManager is never used BT_gcmConfig.java / sportprognoz / src / com / sportprognoz line 38 Java Problem The import android.content.pm.ApplicationInfo is never used BT_gcmConfig.java / sportprognoz / src / com / sportprognoz line 37 Java Problem  File Version: 3.0  * Copyright, David Book, buzztouch.com  *  * All rights reserved.  *  * Redistribution and use in source and binary forms, with or without modification, are  * Permitted provided that the following conditions are met:  *  * Redistributions of source code must retain the above copyright notice which includes the  * Name (s) of the copyright holders. It must also retain this list of conditions and the  * Following disclaimer.  *  * Redistributions in binary form must reproduce the above copyright notice, this list  * Of conditions and the following disclaimer in the documentation and / or other materials  * Provided with the distribution.  *  * Neither the name of David Book, or buzztouch.com nor the names of its contributors  * May be used to endorse or promote products derived from this software without specific  * Prior written permission.  *  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY  * OF SUCH DAMAGE.  * / package com.sportprognoz; import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; public class BT_gcmConfig { / / Name of this class for the debugger ... static final String CLASS_NAME = "BT_gcmConfig";     / / Google GCM API Project Number (provided by google), setup in AndroidManifest.xml ...     static final String SENDER_ID = getGCMProjectNumber ();     / / Tags for log messages ...     static final String TAG = "GCM";     static final String DISPLAY_MESSAGE_ACTION = "com.sportprognoz.DISPLAY_MESSAGE";     static final String EXTRA_MESSAGE = "message";       / / Tells UI to show a message ...     static void displayMessage (Context context, String message) {         Intent intent = new Intent (DISPLAY_MESSAGE_ACTION);         intent.putExtra (EXTRA_MESSAGE, message);         context.sendBroadcast (intent);     }      / / Get GCM Project Number from AndroidManifest.xml ... public static String getGCMProjectNumber () { / / Get the googleAPIProjectNumber from the AndroidManifest.xml file ... String tmpGcmNumber = "440621089316"; return tmpGcmNumber; } } Cards in these 3 lines import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; What could be the reason for the warning?
 
yuri737
Aspiring developer
Profile
Posts: 25
Reg: Apr 12, 2013
Kirov, Kirovska...
4,100
like
05/20/14 11:47 AM (10 years ago)
Thank you all for your help!
 
Joe Sprott
Code is Art
Profile
Posts: 414
Reg: Aug 20, 2011
Melbourne, FL
10,290
like
07/06/14 12:50 PM (10 years ago)
after modifying the code as @patrichmattox directed my device in design mode has indicated that my device is registered. no crashes. However, my BT control panel does not indicate that I have any registered devices. Has anyone experienced this and is there a time delay? Thanks Joe Sprott Bodacious Media
 
Annonymous
Profile
07/06/14 02:04 PM (10 years ago)
sorry
 
Joe Sprott
Code is Art
Profile
Posts: 414
Reg: Aug 20, 2011
Melbourne, FL
10,290
like
07/06/14 02:05 PM (10 years ago)
are you guys installing the deprecated "Google Cloud Messaging for Android Library" in the Extras folder? which key are you using. server key, android key,key with IP address of your BT server? or any referrer allowed key? Thanks Joe
 
DougJoseph
Aspiring developer
Profile
Posts: 161
Reg: Jan 30, 2016
Stonewood
2,210
like
03/03/16 09:47 AM (8 years ago)
Joe: How does one install the deprecated library in the Extra's folder? I have been able to finally successfully build, using Smugwimp's advice to use the lastest SDK and build tools available, even though my target device is still the older device. However, it seems the BT Push code for Android uses an old, deprecated style of code that is not compatible with the newer SDK / build tools / libraries, and the code modifications I found here (above) don't work. They seem to use a mis-mash of old style code and new style code, and it crashes the app every time I send a push notification.
 

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.