How to make my app still running even if the app is closed.(Try lookout app in android)

I want to make an app that if you close it, it will just go into minimize. And if you clear RAM it will automatically be opened(minimize mode). I don’t have a clue where to start, it seems I can’t find anything at the docs. My plan is that if a certain condition is confirmed my app will send a notification that condition X is confirmed. If I on GPS will it automatically get my latitude and longitude?

You working for the CIA or some other 3 letter designate?

Not sure but what you want is probably against multiple guilde lines - primarily stopping the user from controlling their device.

T.

nope, my app is like when you are near in this place, it will send you a notification that “Hey, User you are near here in X place”. that’s why my app should be running even if it is closed.

I’m far from an expert but the bit - 

“And if you clear RAM it will automatically be opened(minimize mode).”

​might just be the other side of that fine line.

T.

Try lookout app, if you have an android device. its like a battery management app. my app should be like that, its like that whenever I clear my RAM that app keeps on opening. Well disregard the RAM thingy(well my client might bring that up for me to solve that problem) Are there anyway to make my app still run even if it is in inactive mode?(Minimize)

You working for the CIA or some other 3 letter designate?

Not sure but what you want is probably against multiple guilde lines - primarily stopping the user from controlling their device.

T.

nope, my app is like when you are near in this place, it will send you a notification that “Hey, User you are near here in X place”. that’s why my app should be running even if it is closed.

I’m far from an expert but the bit - 

“And if you clear RAM it will automatically be opened(minimize mode).”

​might just be the other side of that fine line.

T.

Try lookout app, if you have an android device. its like a battery management app. my app should be like that, its like that whenever I clear my RAM that app keeps on opening. Well disregard the RAM thingy(well my client might bring that up for me to solve that problem) Are there anyway to make my app still run even if it is in inactive mode?(Minimize)