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

BT Push not working trying parse

Got so far but what does this mean? "Create or open your Application class, and add the following line to your onCreate method" Trying it on Android first
 
Joe Sprott
Code is Art
Profile
Posts: 414
Reg: Aug 20, 2011
Melbourne, FL
10,290
like
01/20/14 12:39 PM (11 years ago)
I am working through this at the moment. Your application class is BT_activity_host.java I have some code question I am working through trying to get answers from others with emails. I have it working but I am getting a crash when I send the push. after the push is received and I tap on it the app crashes. I will post when I figure it out. If you want to go back and forth in email just PM me Joe Sprott Bodacious Media
 
hasher13
Android Fan
Profile
Posts: 376
Reg: Jul 21, 2012
Wethersfield
8,060
like
01/20/14 12:44 PM (11 years ago)
Hi Joe, that is the same problem that I have. Once I send the PN, the phone vibrates and chimes that a notification was received but can not see the notification on the phone. If I have the app open and send the PN, it crashes the app. Please keep me in the loop as I am too looking for the answer. Thank you, Howard
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
01/20/14 01:37 PM (11 years ago)
Ok next question how do you add import statements in eclipse? Followed the parse guide and just get errors - set up in a few minutes ! They are having a laugh. I seriously think push notifications are beyond me to set up!
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
01/20/14 02:22 PM (11 years ago)
Given up on parse, will just wait until Buzztouch gets fixed I think
 
Joe Sprott
Code is Art
Profile
Posts: 414
Reg: Aug 20, 2011
Melbourne, FL
10,290
like
01/20/14 02:26 PM (11 years ago)
you don't have to give up just hang in there. I will find the answer and give it to you. once I get it right I will send you the files and you can copy the code Joe
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
01/21/14 11:19 AM (11 years ago)
Hmm I might come back to parse as I've yet to find anybody that has got the Buzztouch push notifications working
 
Joe Sprott
Code is Art
Profile
Posts: 414
Reg: Aug 20, 2011
Melbourne, FL
10,290
like
01/21/14 12:46 PM (11 years ago)
my app is still crashing. I am goijng out to San Diego this weekend and if I can not figure it out before then I will ask all the developers out there if they can look at my files and see the problem. It is a 5-10 minute install once the crash is fixed. I am preety busy this week but I will record a video with the install process once the crash is fixed. Rachael Joanne has indicated she has it working but I got her code and I am getting a crash on the app. The following is the log file error on eclipse. AS you can see in this first log paragraph below that the parse.initialize is not getting called so I am going to try and place the code in the BT_application.java file and delete it from the BT_activity_host.java on create method. the files in play in this process are {BT_activity_host.java,BT_application.java, and BT_activity_start.java and manifest.xml I will try again for an answer if i get time this week. I will post again after I ask in California 01-20 19:29:40.576: E/com.parse.PushService(15578): The Parse push service cannot start because Parse.initialize has not yet been called. If you call Parse.initialize from an Activity's onCreate, that call should instead be in the Application.onCreate. Be sure your Application class is registered in your AndroidManifest.xml with the android:name property of your <application> tag. 01-20 19:29:40.586: D/SensorService(209): disable: get sensor name = BMA250 3-axis Accelerometer 01-20 19:29:40.586: D/Sensors(209): Enable G-Sensor: en = 0 01-20 19:29:40.586: D/Sensors(209): mEnabled = 0x0 01-20 19:29:40.586: D/Sensors(209): /data/misc/AccPrmsF.ini does not exist 01-20 19:29:40.586: D/SensorService(209): SensorDevice::activate--: handle = 0x0, enabled = 0x0 01-20 19:29:40.586: D/SensorService(209): pid=6147, uid=10018 01-20 19:29:40.616: W/ZZ(15578): sensors_appDelegate: onTrimMemory with level: 80 01-20 19:29:40.716: D/dalvikvm(6147): GC_CONCURRENT freed 1805K, 31% free 5173K/7395K, paused 2ms+4ms 01-20 19:29:42.708: I/PowerManagerService-JNI(209): [Stability] PowerManagerService_userActivity JNI pass power key event to PowerManagerService userActivity() 01-20 19:29:42.818: V/ActivityManagerService(209): [GhostScreen] Intent sender perform type = 2 01-20 19:29:42.818: V/ActivityManagerProxy(287): [GhostScreen] Intent sender perform type = 2 01-20 19:29:42.818: I/Intent(209): @test_code: getHtcIntentFlag: 1 obj: 1099633208 01-20 19:29:42.818: V/ActivityManagerService(209): [GhostScreen] appendIntentHtcFlag: 1 01-20 19:29:42.818: V/ActivityManagerNative(209): [GhostScreen] Add intent htc flag : 1 01-20 19:29:42.818: W/CpuWake(209): >>acquireCpuPerfWakeLock! 01-20 19:29:42.818: W/CpuWake(209): <<acquireCpuPerfWakeLock! 01-20 19:29:42.818: I/ActivityManager(209): START intent from pid -1 01-20 19:29:42.828: I/Intent(209): @test_code: getHtcIntentFlag: 1 obj: 1099027816 01-20 19:29:42.848: D/CAT(425): CatService: Return current sInstance 01-20 19:29:42.848: D/SensorService(209): enable: get sensor name = BMA250 3-axis Accelerometer 01-20 19:29:42.848: D/Sensors(209): Enable G-Sensor: en = 1 01-20 19:29:42.848: D/Sensors(209): mEnabled = 0x1 01-20 19:29:42.848: W/KeyguardViewMediator(209): verifyUnlock called when not externally disabled 01-20 19:29:42.858: D/lights(209): [LedInfo] write attr ok name=/sys/class/leds/amber/brightness string=0,len=1 01-20 19:29:42.858: D/lights(209): [LedInfo] write attr ok name=/sys/class/leds/amber/blink string=0,len=1 01-20 19:29:42.858: D/lights(209): [LedInfo] write attr ok name=/sys/class/leds/amber/off_timer string=0 0,len=3 01-20 19:29:42.858: D/Sensors(209): /data/misc/AccPrmsF.ini does not exist 01-20 19:29:42.858: D/SensorService(209): SensorDevice::activate--: handle = 0x0, enabled = 0x1 01-20 19:29:42.858: D/SensorService(209): pid=209, uid=1000 01-20 19:29:42.858: V/NotificationService(209): Battery Full, Charging 01-20 19:29:42.868: D/lights(209): [LedInfo] write attr ok name=/sys/class/leds/green/brightness string=1,len=1 01-20 19:29:42.868: D/lights(209): [LedInfo] write attr ok name=/sys/class/leds/green/blink string=0,len=1 01-20 19:29:42.868: D/lights(209): [LedInfo] write attr ok name=/sys/class/leds/green/off_timer string=0 0,len=3 01-20 19:29:42.868: D/ConnectivityService(209): onUidRulesChanged(uid=10149, uidRules=0) 01-20 19:29:42.878: D/ViewRootImpl(209): @@@- disable SystemServer HW acceleration 01-20 19:29:42.888: I/Intent(287): @test_code: getHtcIntentFlag: 1 obj: 1094591456 01-20 19:29:42.888: I/PhoneStatusBar(287): [GhostScreen][NotificationClicker][onClick] intentFlags: 1 01-20 19:29:42.928: I/ActivityManager(209): Start proc com.android.htccontacts for broadcast com.android.htccontacts/.NotificationRemoveBroadcastReceiver: pid=15594 uid=10099 gids={3003, 1015} 01-20 19:29:42.968: I/Adreno200-EGLSUB(103): <CreateImage:893>: Android Image 01-20 19:29:42.968: I/Adreno200-EGLSUB(103): <GetImageAttributes:1158>: RGBX_8888 01-20 19:29:42.978: D/OpenGLRenderer(355): Flushing caches (mode 1) 01-20 19:29:42.998: W/ZZ(15578): BT_activity_host:onCreate 01-20 19:29:43.018: W/dalvikvm(287): disableGcForExternalAlloc: true 01-20 19:29:43.188: V/PeopleApp(15594): PeopleApp constructed: com.android.htccontacts.PeopleApp@40dabdf0 01-20 19:29:43.188: I/ActivityThread(15594): Pub com.android.htccontacts.TabProvider: com.android.htccontacts.TabProvider 01-20 19:29:43.218: D/dalvikvm(287): GC_EXPLICIT freed 665K, 54% free 6046K/12963K, paused 3ms+5ms 01-20 19:29:43.228: V/NotificationService(209): Battery Full, Charging 01-20 19:29:43.238: D/lights(209): [LedInfo] write attr ok name=/sys/class/leds/amber/brightness string=0,len=1 01-20 19:29:43.238: D/lights(209): [LedInfo] write attr ok name=/sys/class/leds/amber/blink string=0,len=1 01-20 19:29:43.238: D/lights(209): [LedInfo] write attr ok name=/sys/class/leds/amber/off_timer string=0 0,len=3 01-20 19:29:43.238: D/lights(209): [LedInfo] write attr ok name=/sys/class/leds/green/brightness string=1,len=1 01-20 19:29:43.238: D/lights(209): [LedInfo] write attr ok name=/sys/class/leds/green/blink string=0,len=1 01-20 19:29:43.238: D/lights(209): [LedInfo] write attr ok name=/sys/class/leds/green/off_timer string=0 0,len=3 01-20 19:29:43.248: W/dalvikvm(287): disableGcForExternalAlloc: false 01-20 19:29:43.298: D/memalloc(287): /dev/pmem: Unmapping buffer base:0x553b0000 size:5959680 offset:4485120 01-20 19:29:43.308: I/global(15578): In close() at SocketHttpClientConnection 01-20 19:29:43.308: W/ZZ(15578): BT_activity_host:configureEnvironment 01-20 19:29:43.318: W/ZZ(15578): BT_activity_host:configureEnvironment Prompt For Push Notifications is OFF (set to 0) in app's configuration data 01-20 19:29:43.328: D/(209): SensorChannel(): mSendFd = 412, mReceiveFd = 411 01-20 19:29:43.328: D/(15578): SensorChannel(const Parcel& data): mSendFd = -1, mReceiveFd = 50 01-20 19:29:43.328: D/SensorService(209): enable: get sensor name = BMA250 3-axis Accelerometer 01-20 19:29:43.328: D/SensorService(209): SensorDevice::activate--: handle = 0x0, enabled = 0x1 01-20 19:29:43.328: D/SensorService(209): pid=15578, uid=10149 01-20 19:29:43.328: W/ZZ(15578): BT_activity_host:configureEnvironment start GPS is set to NO (set to 0) in the applications configuration data, not starting GPS 01-20 19:29:43.328: W/ZZ(15578): BT_activity_host:setupTabs (0 tabs) 01-20 19:29:43.328: W/ZZ(15578): BT_application: getHomeScreenData 01-20 19:29:43.338: D/AndroidRuntime(15578): Shutting down VM 01-20 19:29:43.338: W/dalvikvm(15578): threadid=1: thread exiting with uncaught exception (group=0x40ac8228) 01-20 19:29:43.338: D/OpenGLRenderer(355): Flushing caches (mode 0) 01-20 19:29:43.358: E/AndroidRuntime(15578): FATAL EXCEPTION: main 01-20 19:29:43.358: E/AndroidRuntime(15578): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sensors/com.sensors.BT_activity_host}: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 01-20 19:29:43.358: E/AndroidRuntime(15578): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2205) 01-20 19:29:43.358: E/AndroidRuntime(15578): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2240) 01-20 19:29:43.358: E/AndroidRuntime(15578): at android.app.ActivityThread.access$600(ActivityThread.java:139) 01-20 19:29:43.358: E/AndroidRuntime(15578): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262) 01-20 19:29:43.358: E/AndroidRuntime(15578): at android.os.Handler.dispatchMessage(Handler.java:99) 01-20 19:29:43.358: E/AndroidRuntime(15578): at android.os.Looper.loop(Looper.java:156) 01-20 19:29:43.358: E/AndroidRuntime(15578): at android.app.ActivityThread.main(ActivityThread.java:4987) 01-20 19:29:43.358: E/AndroidRuntime(15578): at java.lang.reflect.Method.invokeNative(Native Method) 01-20 19:29:43.358: E/AndroidRuntime(15578): at java.lang.reflect.Method.invoke(Method.java:511) 01-20 19:29:43.358: E/AndroidRuntime(15578): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 01-20 19:29:43.358: E/AndroidRuntime(15578): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 01-20 19:29:43.358: E/AndroidRuntime(15578): at dalvik.system.NativeStart.main(Native Method) 01-20 19:29:43.358: E/AndroidRuntime(15578): Caused by: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 01-20 19:29:43.358: E/AndroidRuntime(15578): at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251) 01-20 19:29:43.358: E/AndroidRuntime(15578): at java.util.ArrayList.get(ArrayList.java:304) 01-20 19:29:43.358: E/AndroidRuntime(15578): at com.sensors.BT_application.getHomeScreenData(BT_application.java:472) 01-20 19:29:43.358: E/AndroidRuntime(15578): at com.sensors.BT_activity_host.setupTabs(BT_activity_host.java:395) 01-20 19:29:43.358: E/AndroidRuntime(15578): at com.sensors.BT_activity_host.configureEnvironment(BT_activity_host.java:360) 01-20 19:29:43.358: E/AndroidRuntime(15578): at com.sensors.BT_activity_host.onCreate(BT_activity_host.java:137) 01-20 19:29:43.358: E/AndroidRuntime(15578): at android.app.Activity.performCreate(Activity.java:4538) 01-20 19:29:43.358: E/AndroidRuntime(15578): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071) 01-20 19:29:43.358: E/AndroidRuntime(15578): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161) 01-20 19:29:43.358: E/AndroidRuntime(15578): ... 11 more 01-20 19:29:43.358: V/PeopleApp(15594): PeopleApp created done: com.android.htccontacts.PeopleApp@40dabdf0 01-20 19:29:43.368: E/EmbeddedLogger(209): App crashed! Process: com.sensors 01-20 19:29:43.368: E/EmbeddedLogger(209): App crashed! Package: com.sensors v6 (6.0) 01-20 19:29:43.368: E/EmbeddedLogger(209): Application Label: sensors 01-20 19:29:43.368: W/ActivityManager(209): Force finishing activity com.sensors/.BT_activity_host 01-20 19:29:43.388: E/PeopleApp(15594): DialerService connected ! 01-20 19:29:43.398: D/memalloc(355): /dev/pmem: Unmapping buffer base:0x53f96000 size:4485120 offset:2949120 Joe Sprott Bodacious Media
 

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.