Android

I’ve been testing/using the most recent version of game thrive for iOS 8. Notifications work great but on android, after setting every thing as per the directions, whenever a notification comes to the device the app crashes.

Is this common? Any fix for it?

Thanks. 

Hello,

Could you look at the logcat from the device? If it is crashing there should be an error stack trace in there that will help us pin point your issue.

Thanks.

java.lang.RuntimeException: Unable to instantiate receiver com.gamethrive.GcmBroadcastReceiver: java.lang.ClassNotFoundException: Didn’t find class “com.gamethrive.GcmBroadcastReceiver” on path: 

Caused by: java.lang.ClassNotFoundException: Didn’t find class “com.gamethrive.GcmBroadcastReceiver” on path: DexPathList[[zip file 

It looks like it isn’t finding a part of our Java SDK or the WAKE_LOCK permission didn’t get set somehow. What permissions show for your game in the device settings?

Also a few more question:

What build of Corona are you using?

Are you building on Windows or Mac?

Is your Android SDK up to date?

What version of Android are you testing on?

Does our sample app work correctly for you?

https://github.com/GameThrive/GameThrive-Corona-SDK-Push-Notification-Plugin-Sample

Could you send us a full logcat(of your app starting and the crash), your build.settings, and config.lua to contact@gamethrive.com? We can look through these for you to see if anything is off.

Thanks.

The most recent daily build

Mac

I just updated it.

4.4.2

It doesn’t crash but it doesn’t work.

I’ll give the latest daily build a try to make sure there isn’t anything in there that would break our SDK.

When you tried our sample project did your device show up on our site and show as subscribed? Could you check for errors or warning of the logcat when the app start to when you send the notification?

I’m sorry I might have messed that, did you want me to put our app key and information into the sample project?

Yes, if you could try the sample project again with your appID and Google project number that would be helpful. If that works then we can work on getting it to work in your game.

Yes it crashes with my key with your app.

I just reproduced your crash on Corona 2014.2454. I also just tested our plugin on the latest public build 2014.2393 and it is working. Was GameThrive working for you on an older version of a daily build or is this the first time you are setting up our plugin up?

If you also tried an older version too and it was crashing just the same let us know the version numbers as this will help us find what created this issue.

Thanks.

I’ll try a daily build. This is my first time using gamethrive. It works flawless on iOS.

I would use the latest public build instead of a daily build as everything is more stable on them. We will post back when we find more details on the daily build with our plugin on Android.

That did work but my issue with the public build is that local notifications don’t work when using: 

Runtime:addEventListener( “notification”, notificationListener )

That should work, are you only seeing issues with the Corona notificationListener on iOS 8? Do you have an issue with that with or without our plugin?

If you are only seeing an issue on iOS 8 try using Xcode 5.1.1 with Corona. See my post for instructions on how to set it up. http://forums.coronalabs.com/topic/51264-registerforremotenotificationtypes-is-not-supported-in-ios-80-and-later/?p=266509

its just with the game thrive plugin. The daily build is fine but not the public.

I ran our sample program with Runtime:addEventListener(“notification”, notificationListener) and the notificationListener function gets called just fine with a table in the event parameter when I open a local notification. I built with the latest public build 2014.2393 and ran on Android 4.4 and iOS 8 devices.

For you on 2014.2393 is notificationListener not getting called or is the event parameter blank? Is it not working for you on Android or iOS?

Ok I figured it out, wow thats obscure. Somehow game thrive is turning off the gps on the public build.

Runtime:addEventListener( “location”, checkGPS)

That is very odd! Is the location listen not working on Android or iOS or both? On Android you need to include a permission are you missing that?

I’m not sure why but with out doing anything it started working. Anyway thanks for your help.

Hey, glad everything is working for you on the public build now.

Quick update on the daily builds, it seems daily build 2431 and newer doesn’t work with GameThrive but build 2429 and older do. It seems android.support.v4 was removed in those newer builds and is required for GameThrive to work. Since the public build is working you will probably stick to that but I’ll update everyone here when it is working on the newer daily builds.

Thanks.