android - how Respond to BroadCast receiver based on Application Running status.? -


i have registered broad cast receiver in app store usb connected/disconnected state in shared preferences. working fine.

now wanted perform task if usb connected , application running. how can this?

if application not running , ll perform task in first activity based on shared preference value.

please give ideas this..

i have paste code shows how check running services here. if looking activity use runningtaskinfo instead of runningservicesinfo.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -