Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / setlocalnotification trouble

Author
Message
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 29th May 2016 22:02 Edited at: 30th May 2016 08:58
I'm trying to set SetLocalNotification but can't get it working. My first attempt worked perfectly, but every subsequent attempt has failed. I have tried using different IDs and have checked that the notification exists (it does). Am I doing something wrong or is this a bug?



[EDIT} Ok, a little more information: When I first tried using SetLocalNotification, I had set it to fire after 18 seconds. I tested via Broadcast to my Android device. I ran the app, exited and closed AppGameKit Player, and a few seconds later the notification appeared! Perfect... except now I can't get it to work at all, whether via broadcast or from an installed APK.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 30th May 2016 09:46 Edited at: 30th May 2016 10:41
I have figured it out! The LocalNotification events only fire if your App is open in the background (which defeats the object of being able to set local notifications!). I want to set a local notification to notify the user when their lives are fully restored. The App will not be running in the background by the time that happens. I guess there is something in the AppGameKit Player exit routine that is clearing the local notifications

Can anyone confirm this?

Is this something that can be fixed, or should I go down the push notification route?

Thank you.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 30th May 2016 15:48
I'm now confident this is a BUG!

I've been searching for a solution and have found a little more information about this. The problem is that the app seems to always think its in the foreground unless it is open and minimised. This is because when the notification event happens, it starts the app and thinks it is in the foreground, and if the app is in the foreground then the notification message doesn't show.

Please fix this Paul as I need local notifications for my Fruit Smoothie game I am working on.


V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 30th May 2016 17:40
@paul, i can agree, me had same problem ...
AGK (Steam) V2.0.18 : Windows 10 Pro 64 Bit : AMD (15.30.1025) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 1st Jun 2016 14:08
Found a discusion (and solution) on similar issue here: https://github.com/phonegap-build/PushPlugin/issues/85

@Paul: Can a similar fix as suggested by Emadello on the 22nd of Oct 2013 in that thread be used with AGK2?

V2 T1 (Mostly)
Phone Tap!
Uzmadesign
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 3rd Jun 2016 18:46
This issue is real sticking point for me. Can I at least get a "We're looking into it."?

I can't be bothered posting a big rude shouty message on Steam (which looks like a great way to get TGC support). Are there any official support channels? I've tried e-mailing Paul, and posting on here, but drawn a blank.

V2 T1 (Mostly)
Phone Tap!
Uzmadesign
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 3rd Jun 2016 22:54
I hope you can get an answer and have this resolved. I would also like to use local notifications for an in-progress app but it seems there are unusable glitches with it. One of the most frustrating parts in finding bugs with AppGameKit is then playing the waiting game and rarely ever knowing whether it is even being looked at or if it will be one of those bugs that persist for years Like this other bug report that seems to prevent the submission of iOS apps with the latest build--5 days and still no response from TGC to even indicate they've read it. With only one AppGameKit developer on board and no set feature map or developer blog (in stark contrast to Lee's extremely detailed daily technical logs he kept for years when working on GameGuru) it always makes me weary of sticking to it--despite it being my favorite app programming platform.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 5th Jun 2016 10:17
In the file "NotificationAlarmReceiver.java" there is a line:



I think if I comment this out, it will partially fix the problem. Notifications will probably always show, even when the app is open and in the foreground, but that is better than not showing at all if the app is closed. I can cancel notifications when my app starts and set them again when exit. It's not ideal, but definitely better than the current implementation.

I just installed Android Studio and the latest JDK. Set the JAVA_HOME environment variable, but Android Studio still won't start (invalid JDK installation apparently) so I can't even test this idea yet.

Getting fed up with this now.


V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th Jun 2016 16:06
Thanks, fixed for the next version
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 6th Jun 2016 17:08
Quote: "Thanks, fixed for the next version"


Thanks Paul. I'd like to buy you a !
V2 T1 (Mostly)
Phone Tap!
Uzmadesign

Login to post a reply

Server time is: 2024-04-19 22:28:03
Your offset time is: 2024-04-19 22:28:03