I have a situation in an Android app where I want to start a network activity (sending out some data) which should run every second. I achieve this as follows:
You should set andrid:allowRetainTaskState="true" to Launch Activity in Manifest.xml. If this Activty is not Launch Activity. you should set android:launchMode="singleTask" at this activity