Agasper / unity-android-notifications

Unity3D Plugin for Android local notifications with example project
Other
557 stars 184 forks source link

AplicationPause #98

Open pitaslayer opened 6 years ago

pitaslayer commented 6 years ago

Good Afternoon,

I'm trying to send an notification when the application goes to pause (OnApplicationPause) however it seems not to be working. However the rest of the code it is working.

Can you give me advice or help regarding this topic?

Agasper commented 6 years ago

It may not work with OnApplicationPause. Try to setup notification on application start.

pitaslayer commented 6 years ago

Humm. The problem is I can't setup a timer at the application start because if the user doesn't go to pause the app shouldn't give any notification. There is no workaround possible?

Diamonds0a commented 6 years ago

You can continually create then delete the timer. So that if a person backgrounds the app, the timer will fire.

On Thu, Jul 5, 2018 at 11:10 PM pitaslayer notifications@github.com wrote:

Humm. The problem is I can't setup a timer at the application start because if the user doesn't go to pause the app shouldn't give any notification. There is no workaround possible?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Agasper/unity-android-notifications/issues/98#issuecomment-402936179, or mute the thread https://github.com/notifications/unsubscribe-auth/AAcvEwQn1WZcFSUU99BTMRVYlZjDYGyqks5uDv88gaJpZM4VDO5N .

iRDS commented 5 years ago

I had the same issue and using the void OnApplicationFocus(bool hasFocus) solved it for me, in case this helps someone.