1

Xiaomi Redmi Note 3 ,Any Custom service creating using code is disable when you clear application from background, issue not happen in samsung and other phone but happen in similar phones.

David Wasser
  • 93,459
  • 16
  • 209
  • 274

1 Answers1

2

You need to add your app to the list of "protected apps". On different phones this is in different places, try looking in "settings->Security". You need to explicitly enable your app to run in the background.

David Wasser
  • 93,459
  • 16
  • 209
  • 274
  • i have tried that also,but not working as i want. it will remove all custom services from background , when you clear ram i need to do it using coding but also no method is called when it will remove from ram , i have tried many way but i didn't get succeed. but thanks for your help. – Varun Aghara Jul 31 '17 at 15:23
  • Sorry, I don't understand your problem. – David Wasser Jul 31 '17 at 15:28
  • i mean i have to do this using coding in my application , i want my application to run in background any how. – Varun Aghara Jul 31 '17 at 15:35
  • That isn't possible on those devices. The user MUST manually enable your application to run in the background. You cannot do this in code. – David Wasser Jul 31 '17 at 16:18