Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification is stuck #2

Open
fouadchamoun opened this issue May 17, 2016 · 13 comments
Open

Notification is stuck #2

fouadchamoun opened this issue May 17, 2016 · 13 comments
Labels

Comments

@fouadchamoun
Copy link

Hello,

I've recently installed your SDK and noticed that the Pathsense notification shows up for a really brief time and then quickly disappears. However, sometimes the notification doesn't disappear and is stuck. I have to either kill the process or restart the phone to make it go away.

Do you have any idea why this could be happening ?

Thank you in advance,

Fouad

@dyerjo
Copy link
Contributor

dyerjo commented May 17, 2016

Hi Fouad,

Thank you for your feedback. This is very helpful and important for making our SDK better!

In order to troubleshoot this issue, I have a few questions:

  • What device and OS does this happen on?
  • Is the API frozen (i.e. not providing responses)?
  • When you say stuck, do you mean the notification is always in the notification bar?
  • Does this occur when you relaunch your app from adb (i.e. Android Studio), or when you click the icon launcher?

Thank you,
John Dyer

On May 17, 2016, at 6:34 AM, Fouad Chamoun notifications@github.com wrote:

Hello,

I've recently installed your SDK and noticed that the Pathsense notification shows up for a really brief time and then quickly disappears. However, sometimes the notification doesn't disappear and is stuck. I have to either kill the process or restart the phone to make it go away.

Do you have any idea why this could be happening ?

Thank you in advance,

Fouad


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub #2

@fouadchamoun
Copy link
Author

Hi John,

  • This issue appeared a couple of times on a Nexus 4 running Stock Android Lollipop. It happened also once when I was testing run-time permissions on a Oneplus One running Android Marshmallow.
  • On the Oneplus, it happened when I disabled location permission for the app from settings menu. the notification came up in the notification drawer and didn't go away until I re-enabled the system permission.
  • On the Nexus 4, it happened randomly a couple of times but not because of a disabled permission as Android Lollipop uses "classic" permissions that are all enabled as soon as the app is installed.
  • As for the API being frozen, I didn't get to check that. I will as soon as it happens again on the Nexus 4. (I believe it would be definitely frozen on the Oneplus One if I disable the permission).
  • The notification stays in the notification drawer and you can't remove it as it's a persistent notification.
    Normally It would go away so fast I could only see the "ticker" and would never see it in the drawer.

Thank you again for your help,

Fouad

@dyerjo
Copy link
Contributor

dyerjo commented May 17, 2016

Hi Fouad,

Great feedback!

The second scenario that triggers the notification on the Oneplus is a bug. We will provide a fix for that. Regarding, the Nexus 4, not sure what the issue is.

As for why the notification appears, it is a side-effect of the Pathsense SDK running as a foreground service. Particularly, in the latest Android releases, we have noticed the OS being more aggressive in terminating background services. Running as a foreground service gives us some level of protection.

You can customize both the notification and the ticker text to your own branding here:

https://developer.pathsense.com/node/778 https://developer.pathsense.com/node/778

Please, let me know if you have any more questions and/or issues.

Thank you,
John Dyer

On May 17, 2016, at 8:21 AM, Fouad Chamoun notifications@github.com wrote:

Hi John,

This issue appeared a couple of times on a Nexus 4 running Stock Android Lollipop. It happened also once when I was testing run-time permissions on a Oneplus One running Android Marshmallow.

On the Oneplus, it happened when I disabled location permission for the app from settings menu. the notification came up in the notification drawer and didn't go away until I re-enabled the system permission.

On the Nexus 4, it happened randomly a couple of times but not because of a disabled permission as Android Lollipop uses "classic" permissions that are all enabled as soon as the app is installed.

As for the API being frozen, I didn't get to check that. I will as soon as it happens again on the Nexus 4. (I believe it would be definitely frozen on the Oneplus One if I disable the permission).

The notification stays in the notification drawer and you can't remove it as it's a persistent notification.
Normally It would go away so fast I could only see the "ticker" and would never see it in the drawer.

Thank you again for your help,

Fouad


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #2 (comment)

@fouadchamoun
Copy link
Author

fouadchamoun commented May 18, 2016

Hi again !

I appreciate your help on this issue ! I understand the need for the notification as you use a foreground service. Actually the notification itself is not the problem because in normal cases it only shows up for a fraction of a second and I've customized it just in case.

Regarding the Nexus 4, the problem came up again yesterday and also just came up now as i'm writing this. The notification won't go away until I Force Close the app. Pathsense is still sending activity updates while the notification is stuck. I kill the app by Force Close (in settings menu) and Pathsense stops sending updates. Pathsense doesn't restart until I reopen the app.

What happened yesterday is that my colleague noticed that his phone kept the GPS activated long after he arrived home. The app deactivates GPS when it detects STILL, TILTING or ON_FOOT activity.
I'm guessing that the GPS wasn't deactivated because Pathsense stopped working sometime while IN_VEHICLE and we didn't receive the change to STILL. But I'm also investigating any possible bugs on my side.

I can't really say what triggered the bug yesterday but I can tell you what just happened now. The app was open, no notification. I locked the screen (onPause). I turned on the screen without unlocking, no notification. Unlocked the screen back to app (onResume), no notification. Tapped the home button (onPause), notification came up immediately and won't go away.

Thank you again,

Fouad

@dyerjo
Copy link
Contributor

dyerjo commented May 18, 2016

Hi Fouad,

What version of Android is running on the Nexus 4?

We will look into this.

Thank you,
John Dyer

On May 18, 2016, at 1:07 AM, Fouad Chamoun notifications@github.com wrote:

Hi again !

I appreciate your help on this issue ! I understand the need for the notification as you use a foreground service. Actually the notification itself is not the problem because in normal cases it only shows up for a fraction of a second and I've customized it just in case.

Regarding the Nexus 4, the problem came up again yesterday. The notification wouldn't go away, and Pathsense wasn't sending any activity updates. Our app kept the GPS on and the battery got depleted because we didn't detect the transition from IN_VEHICLE to STILL (I guess Pathsense stopped working while IN_VEHICLE).

I'm going to implement a fail safe in order to detect this scenario and try to kill the process so that Pathsense would reinitialize. If you have any advice on how to correctly initialize Pathsense another way I would appreciate it.

Thank you again,

Fouad


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #2 (comment)

@fouadchamoun
Copy link
Author

Stock Android 5.1.1

Thank you

@fouadchamoun
Copy link
Author

Hi again,

The same problem came up on a Samsung Ace 3 running CyanogenMod 11 (Android 4.4.4). The notification won't go away.

Thought I'd tell you about it. Don't hesitate if you need more information.

Have a good day,

Fouad

@dyerjo
Copy link
Contributor

dyerjo commented May 19, 2016

Hi Fouad,

Was the API stuck as well on the Samsung Ace 3?

Thanks again, for the feedback. We will look into this.

John Dyer

On May 19, 2016, at 1:06 AM, Fouad Chamoun notifications@github.com wrote:

Hi again,

The same problem came up on a Samsung Ace 3 running CyanogenMod 11 (Android 4.4.4). The notification won't go away.

Thought I'd tell you about it. Don't hesitate if you need more information.

Have a good day,

Fouad


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #2 (comment)

@fouadchamoun
Copy link
Author

we continued to receive activity updates but the notification wouldn't disappear

thank you John

@Kahtaf
Copy link

Kahtaf commented Jan 3, 2017

Hi there,

I am seeing the same issue on 2.3.0.12, Nexus 6P, Android 7.1.1, but works as intended on a Samsung Galaxy S4, Android 5.0.1. I would really like to ship an app with the Pathsense SDK, seeing as how it's much more accurate than Google's alternative, once this issue is resolved. Please let me know if you need any more information.

Thanks,
Kahtaf

@egmontr
Copy link

egmontr commented Mar 21, 2017

Hi together,

I am using your PathSense API in one of my apps and an user complains, that the notification is not disappearing on his device!
PathSense 2.3.0.18
Android 7.1.1
Device OnePlus 3T OxygenOS 4.1.0

What can it be?

Thanks
Egmont

@npfernandeztheillet
Copy link

Same issue in the last version of the SDK and Huawei P10.
Android 8.0

jhurstus added a commit to jhurstus/mirrortracker that referenced this issue Dec 4, 2018
@manav-mj
Copy link

manav-mj commented Feb 26, 2019

Same issue is occuring in version 3.2.0.0 with
OnePlus 6
Android 9.0
Ozygen OS Beta 12

The notification shows permanently even when pathsense is running as background service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants