Upload Android screenshot to server.

Hi!

I would like to take a Screenshot of my application when it's infront and send it to (POST) a web-server.

Code sample would be great.

/J
jamppiAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
KRUNAL TAILORConnect With a Mentor Freelance Mobile DeveloperCommented:
Hi jamppi,

See below tutorial for take screenshot programmatically and send email. You can learn there how to capture bitmap of screenshot and save this bitmap image to sd card. Rather than email at last step you can upload to your server api.

http://www.truiton.com/2013/03/android-take-screenshot-programmatically-and-send-email/

Let me know if you have any question regarding this.

Thanks & Regards,
Krunal T. Tailor
0
 
OriNetworksCommented:
This is only possible on a rooted phone. If you plan on publishing the application it will not work. Aside from that, I do not believe it providing full code solutions but I will point you in the right direction
For taking a screenshot programmatically:
http://google.com

For interacting with URLs
http://developer.android.com/reference/android/webkit/WebView.html
0
 
jamppiAuthor Commented:
I will have it for debugging purposes and the app will not be published.

/J
0
 
OriNetworksCommented:
Comparable to DDMS which is the manual way, the follow link describes the code required. It works by capturing an image of the view and in this specific case sends an email with the image.
http://stackoverflow.com/questions/14195302/eclipse-and-automatic-screenshots
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.