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

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -