how to clear the running app in android?

Android: How to know where the app is running

  • There is some way to know if my Android app is running on debugger or on a phone?. I want to check some variable, property, or something like that to know where the app is running to prevent some crash when I call some 3rd applications (not available on debugging time) Thanks and sorry for my poor english

  • Answer:

    You might want to look into http://developer.android.com/guide/developing/debugging/ddms.html You can access logs, threads and heap information. also check running apps and services. You can also simulate phone behaviours on the emulator, like an incoming call, as an example. Well, I would also recommend reading all the information in the http://developer.android.com/guide/developing/debugging/index.html section, there are a lot of useful tools available for Android developers.

Mark Comix at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

You mean detecting the emulator? Because you can run under debugger also on your device. Use this to detect the emulator (worked for me a while ago): "google_sdk".equals(Build.MODEL)

Peter Knego

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.