---
title: "Which types of flags are used to run an application on Android?"  
description: "Which types of flags are used to run an application on Android?"  
author: "Kalin"  
published: 2022-04-14  
canonical: https://answers.mindstick.com/qa/96788/which-types-of-flags-are-used-to-run-an-application-on-android  
category: "troubleshooting"  
tags: ["troubleshooting", "android", "android os"]  
reading_time: 2 minutes  

---

# Which types of flags are used to run an application on Android?

Which types of [flags](https://answers.mindstick.com/qa/97320/what-are-the-flags-in-8086-microprocessor) are used to run an [application](https://www.mindstick.com/blog/101/difference-between-click-once-application-and-windows-installer) on Android?

## Answers

### Answer by Hitesh Vohra

![Which types of flags are used to run an application on Android?](https://answers.mindstick.com/QuestionAnswer/ce27be41-f63c-4f4e-a315-747c0cd82f4d/images/806de592-aa73-4d6a-bcab-209ec1122a7b.png)\

- There are **two types of flags** that can be used to execute an application in [**Android**](https://answers.mindstick.com/qa/96795/which-is-the-best-operating-system-android-or-ios):
- FLAG ACTIVITY NEW TASK
- FLAG ACTIVITY CLEAR TOP
- On Android, activities are launched using intents. You can control the task that will contain the activity by setting flags. There are flags for creating new activities, using existing activities, and bringing an existing instance of an activity to the front.
- **FLAG ACTIVITY NEW TASK** is one of the flags that can be used to change the default behaviour. In a new task, begin the action. If a task for the activity you're initiating is already running, it's brought to the foreground with its previous state restored, and the activity gets the new intent in onNewIntent().
- FLAG ACTIVITY CLEAR TOP: If the Activity being started is already running in the current task, all other activities on top of it are terminated (with a call to the onDestroy function) and this intent is provided to the restarted instance of the Activity.

\

**Read More: [How to terminate a running process in Linux?](https://answers.mindstick.com/qa/96832/how-to-terminate-a-running-process-in-linux)**


---

Original Source: https://answers.mindstick.com/qa/96788/which-types-of-flags-are-used-to-run-an-application-on-android

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
