jd1378 / otphelper

open-source application that can copy OTP and codes from notifications automatically for you
GNU Affero General Public License v3.0
356 stars 31 forks source link

The application no longer works when the phone is restarted. V. 1.14.1 #82

Closed franco27 closed 1 month ago

franco27 commented 2 months ago

Hello,

With version number 1.14.1

Just a few months ago, I installed your application and discovered it. After the installation, I noticed that your application was working perfectly on my mobile phone. On several occasions, thanks to your application, I was able to copy the code. (even after restarting the phone it worked correctly)

Recently, probably due to an update, I realized that your application was no longer working at all. I noticed that there have been several updates since I discovered this issue. However, since I do not regularly receive SMS messages with a code, I do not remember the version I initially installed.

After uninstalling, restarting the phone, and reinstalling your application which did not solve the problem, I am reaching out to you in hopes that you can resolve this issue.

My phone is a Xiaomi brand and of course, I have respected the requirements for the settings. For your application, I have disabled battery optimization, enabled the setting for your application to run in the background, and also in the security settings, I have enabled the lock on the window of your application. I have enabled automatic startup. I have given permission for notification access.

It is on this last setting that I have noticed a problem with your application. Every time I start my mobile phone, I have to re-enable notification access permission (I have to disable and re-enable it again for the application to function properly and this happens every time I start).

Otherwise, upon starting the phone when I test notifications, I only receive one notification from your application. I do not receive the two notifications, one titled "notification test" (this is the only notification I receive) and the other with the code where I can copy "detected code".

My smartphone system configuration Xiaomi Redmi 8 Android Version 10 Android 10 MIUI V12.5.2.0.QCNEUXM

Architecture 64-bit

Instruction sets arm64-v8a armeabi-v7a armeabi Qualcomm® Snapdragon™ 439

CPU 4 x Cortex-A53 Cores 8 RAM size 4 GB

IMG_20240421_070657.jpg

jd1378 commented 2 months ago

Hi thanks for taking your time to write this I am aware of the notification permission issue, which is most likely a bug on certain android OS versions, as it does not happen on my phones (which are both Xiaomi and one is android 13, and the other is android 14 on HyperOS). so I don't really know how to solve it, unless there's a fix that I am unaware of

regarding your issue in general, I did not understand, does the app now stop working after a while on it's own, or is this completely about the notification permission?

if the app stops working after a while with the latest updates, I suspect that the issue is the recent change to app's activity props, which I will revert if that's the case

franco27 commented 2 months ago

I am on Android 10 with a Xiaomi phone that has not received major updates in over 2 years. Now I will stick with Android 10.

Now when I receive updates, they are for system modules that I have not had for several months.

Does the app stop working? I don't think so because I have checked that. After several hours, I repeated the notification test from your app multiple times with varying durations, such as half a day, a morning, or several hours. And every time I do the notification test, both notifications appear.

I lose notification access permission every time I restart the phone. As I mentioned, every time I restart the phone, I do the notification test and only receive one out of the two notifications. When I disable and re-enable notification access, I no longer have a problem and the notification test works correctly, with both notifications being received.

This was not an issue when I initially installed your app several months ago. But I no longer remember which version number I initially installed. I only remember that the app was in French.

When I reinstalled the current version, there was no update because before it arrived, I had uninstalled a previous version. There have been multiple phone restarts.

franco27 commented 2 months ago

It's been recently or just a few days since I noticed the issue with the notification access parameter. Since then, I have not received any codes via SMS. Therefore, in theory, if I receive both notifications, it should work correctly if I receive a code via SMS. I searched online for a service that could send a test with a code via SMS, but I did not find one.

jd1378 commented 2 months ago

I see

the notification access permission problem did exist even before the app was released, when I was still testing the app on my family members' phones, so I am sure of this fact

what I have doubts now, is that maybe somehow at some point it got fixed accidently without me knowing for people like you, which makes it extremely difficult to find the cause

however I understand your frustration, I try to look into it when I have some time, maybe I find some solution, but I wouldn't get my hopes up

franco27 commented 2 months ago

Thank you for your response and I hope you will find where the problem lies.

I wish you a happy May 1st.

jd1378 commented 1 month ago

I tried looking up the issue and could not find a single thing on this, as not many developers are interested in reading all notifications

however I added a check on app's auto start on reboot which hopefully should show a notification when the permission has been revoked, which when tapped will open the settings for granting the permission again

this was the best I could do to at least make it more convenient

it will be released soon as 1.15.0

please let me know if the notification did not show up after reboot

jd1378 commented 1 month ago

I added a fix in 1.15.1 which may fix the auto start issue without the need to re-granting the permission please try it out and let me know how it works for you @franco27

franco27 commented 1 month ago

Thank you for trying to fix the issue. Unfortunately, the malfunction still persists.

In version 1.15.0 and 1.15.1, I am not being notified when the notification test does not work. In version 1.15.1, I still have to disable and re-enable notification access every time I start my mobile phone.

I will try to uninstall, restart the mobile phone, and reinstall your application with version 1.15.1. Maybe this time it will work.

jd1378 commented 1 month ago

Hi then I think the fix is useless, because another person had exactly the same issue and it did not resolve it for him as well I simply have to post the notification on every reboot on android 10 and 11, regardless of the permission status, as it is a bug in those android versions

franco27 commented 1 month ago

Upon restarting the mobile phone, there is now a notification to remind you to reactivate the notification access permission 🔔

In the latest version, this works correctly and thank you for adding it. It's very useful, and thank you.