android - How to stop background process automatically if app not in touch -


now going on check whether app active or not.

for had went onpause() , onresume() had used in baseactivity abstract class other activity.

now need if app not view in screen other app running in screen in case how can check whether app active or not.

for example using ontouch() if didn't touch app more 5min should stop background service.

in facebook notification if logout or not in use here need should not show notification when app not in use 5 min.

if have idea please me friends.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -