2

I would like to take a screenshot of my application from the users device. Is it actually possible if the device is not rooted?

Basically I would like to take screenshot when some kind of an error occurred.

Personally I think it shouldn't be possible because of the privacy issues etc.

If it's possible could you give some examples or resources for more info?

Karlis
  • 1,501
  • 4
  • 19
  • 31
  • 1
    Maybe this thread could help you: [How to programatically take a screenshot on Android?][1] [1]: http://stackoverflow.com/questions/2661536/how-to-programatically-take-a-screenshot-on-android – Diego Palomar Nov 06 '13 at 11:02

1 Answers1

1

If you want to save information about the app crash, you must go with acra library

ACRA is a library enabling Android Application to automatically post their crash reports to a Google Doc form. It is targeted to android applications developers to help them get data from their applications when they crash or behave erroneously. (Taken from link)

Hope this is helpful.

Francesco Montesano
  • 8,485
  • 2
  • 40
  • 64
Qadir Hussain
  • 8,721
  • 13
  • 89
  • 124
  • Basically I would like to save not only crashes but all logs to file on the phone but will take a look at your suggestion. Are there such libraries for android where I could save logs on file and send the file to server? – Karlis Nov 06 '13 at 12:38
  • Yes may be you can achieve this. have a deep look on ACRA library, – Qadir Hussain Nov 06 '13 at 12:40
  • Nice tool but the problem is that it only sends reports when there are some crash! – Karlis Nov 06 '13 at 14:31
  • Yes. but when your app crashes it triggers some of the code in ACRA, you can embed your code of taking snapshot over there. May be this trick works for you. – Qadir Hussain Nov 07 '13 at 05:29
  • here is the code of taking snapshot programmaticaly of your app. http://stackoverflow.com/questions/7762643/android-take-screen-shot-programatically see the answer of Jovan – Qadir Hussain Nov 07 '13 at 05:33
  • But the problem is that the app is for rooted phone! I wanted to know if it's even possible to take screenshot from non-rooted phone. For example some picture from my app. I don't know if it's even possible – Karlis Nov 07 '13 at 09:02