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

Want to add the background service, the current version must lock the background, is not stable #127

Closed
CyanDragonS opened this issue Sep 11, 2024 · 9 comments

Comments

@CyanDragonS
Copy link

Perhaps it would be more stable and convenient to add a background service that automatically, destroys activities when the APP enters the background

@aj3423
Copy link
Owner

aj3423 commented Sep 11, 2024

I don't understand what you mean by:

must lock the background

Do you mean the app stops working when it's not kept in the foreground? If that's the case, check this out: #100

@CyanDragonS
Copy link
Author

Yes. That's what I mean. But strangely self start didn't work on my phone, I had to manually open the APP and then lock it in Android's Recent Task management page to avoid the system cleaning up the background task of this app, and keep it running.
So I hope to add a background service that will run in the background even after destroying the Activity (that is, the APP is not displayed on the recent task page after exiting the APP).
Thanks to the author for making this software.

@aj3423
Copy link
Owner

aj3423 commented Sep 14, 2024

It's supposed to work even after the process is killed.

Does it not work for calls, texts or both?
There must be some settings preventing the app from auto start. As mentioned in the previous link, usually in the battery settings.

Try to search in the system settings with keywords like "auto run", "auto start", or maybe just "run", "start", find the "startup manager", the name may vary from device. This app must have been disabled in it by default, it should work after turned on.

@redcat42
Copy link

redcat42 commented Sep 14, 2024

Yes. That's what I mean. But strangely self start didn't work on my phone, I had to manually open the APP and then lock it in Android's Recent Task management page to avoid the system cleaning up the background task of this app, and keep it running.
So I hope to add a background service that will run in the background even after destroying the Activity (that is, the APP is not displayed on the recent task page after exiting the APP).
Thanks to the author for making this software.

if you select SpamBlocker as the default spam blocking app to be used in Android, even if you use a Samsung/Pixel that might be killing it in the background, it will have to wakeit/launch it to check whenever you get a call/sms (whichever you may be using), Android will have to pass sms/calls through the 'default spam blocking app' you have set, this is my understanding, i could be wrong

edit:
Screenshot_20240914_115411_Permission controller

@CyanDragonS
Copy link
Author

CyanDragonS commented Sep 14, 2024

@redcat42 I think you're right, sometime it starts and works on after receiving a call or message. Thanks.
After I reset the default spam blocker APP and turned it on for self start, set the background power to unlimited, and turn on the notification bar shortcut button, the background running issue was resolved, and even I killed the app directly, I observed that it would self start (But in some cases, it doesn't auto start right away, it starts and takes effect after receiving a call or message), But I still can't confirm what the problem is, too many variables, maybe the notification bar shortcut button woke it up? Anyway, problem solved. Thank you.
Thanks to the author, this software is very good.

@CyanDragonS
Copy link
Author

One small suggestion, though, is it possible to set a button to open the Settings of the default spam blocker APP? My phone doesn't display this option, so I had to use adb to look up the setting's acitivity to set the default spam blocking app.
Perhaps the software will automatically notify to turn on?
54eabd9cff44a4aaa53071413668bc5

@redcat42
Copy link

redcat42 commented Sep 14, 2024

One small suggestion, though, is it possible to set a button to open the Settings of the default spam blocker APP? My phone doesn't display this option, so I had to use adb to look up the setting's acitivity to set the default spam blocking app.
Perhaps the software will automatically notify to turn on?

when installing SpamBlocker, it does actually ask/give you the option to make it your default Spam Blocking app in Android

however, judging, based on your screenshot you are compiling AOSP? on your own or are using a custom ROM or a older version of Android, glad you could adb shell and set the default app, maybe you can share the adb command so it will help someone else in the future who comes across this post 👍

@aj3423
Copy link
Owner

aj3423 commented Sep 14, 2024

The app won't be launched on incoming call or message, you won't see the app in the recent app list. Clicking on the notification however will launch the app, you can swipe left the notification to dismiss it without launching the app. And if you have turned on some setting to keep it running in the foreground, you can turn it off, since it's not caused by this and it consumes less battery.

About the "Set as the default CallerID app", usually you don't need to set it manually in the system settings, there should be a popup like:
image

There are 3 places that are supposed to have triggered this prompt, seems they are not triggered in your case.

  1. At the first launch, this popup is removed in the latest version 2.0, but it's just released a couple of days ago, I guess you are using the previous version.
  2. When enabling the call blocking
    image
  3. When clicking on the "Call" tab
    image

Maybe you are using the v2.0 and haven't clicked on any of them?

@CyanDragonS
Copy link
Author

@redcat42 Thanks. It has been determined that these permissions, if not granted, are automatically prompted to be granted at startup.
@aj3423 Maybe I'm misrepresenting myself, but what I'm trying to say is that if you have this APP set as the default Android spam blocker APP, it will work automatically when I get an incoming call or message, but it won't show up in the recent app list.

Thanks a lot, this issues have been resolved.
Thank you for this good software.

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

No branches or pull requests

3 participants