Imagine a "home screen" that runs a service. When the service reads bluetooth data that meets a certain value, it starts a new activity to notify the user of such a change.
What happens to the home screen activity when the new activity is created from the service? As far as I know, I cannot call finish() to end the activity from the service. I have to imagine that the home screen sits dormant somewhere in the stack?
What would happen if I ran this application all day and had 100 alerts?
for Example, from a service, I will call:
Intent alertActivity = new Intent(this, Alert.class);
alertActivity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(alertActivity);
Later, when the alert is cleared, it returns to the Home Screen.