Android Question How not to kill the App from a cleaer?

CyclopDroid

Well-Known Member
Licensed User
Longtime User
Hi all.
If I use an app that killall (like ZDbox, CClean), my widgets stops working. Another Widget into my phone not closing... how can do not to kill my widget?
Thanks
 

CyclopDroid

Well-Known Member
Licensed User
Longtime User
If I lauch the ZDBox and press KillAll (but other app running automatically) my App terminate and the Widget not work.
It has the same effect as a ExitApplication.
Putting it in Debug Mode, I think I get a log output ... but I do not know where to put the control. There will be a way to detect if the app is closed it's, I think!
 
Upvote 0

CyclopDroid

Well-Known Member
Licensed User
Longtime User
Nothing. If the exitapplication is called from another App, I dont intercept the part of block.
 
Upvote 0

CyclopDroid

Well-Known Member
Licensed User
Longtime User
:confused:
I've this code into Service


B4X:
Sub rv_Disabled
If Main.FirstClick=True Then
   ToastMessageShow("The Widget is Closed",True)
  CancelScheduledService("")
  StopService("")
  Main.DestroyApp=True
  StartActivity(Main)
End If
End Sub

Sub Service_Destroy
   StartService(Me)
End Sub



....Not work. When I test my widget, it not respond! o_O
 
Upvote 0

CyclopDroid

Well-Known Member
Licensed User
Longtime User
Anyway the:

B4X:
Sub Service_Destroy
   StartService(Me)
End Sub

are incorrect for my project, because when I emove de widget of phone screen (rv_Disable), I exit application (with the Main.DestroyApp=True, in Main, I call ExitApplication for terminate it) ;)
The problem is when the App Cleaner terminate the App (Main).
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

CyclopDroid

Well-Known Member
Licensed User
Longtime User
Up="Please Help me to find a solution" or "Please answer" :p
 
Upvote 0
Top