Solved

Upload Android screenshot to server.

Posted on 2015-01-20
4
292 Views
Last Modified: 2015-02-26
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
0
Comment
Question by:jamppi
  • 2
4 Comments
 
LVL 17

Expert Comment

by:OriNetworks
ID: 40560048
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
 

Author Comment

by:jamppi
ID: 40560141
I will have it for debugging purposes and the app will not be published.

/J
0
 
LVL 17

Expert Comment

by:OriNetworks
ID: 40560266
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
 
LVL 12

Accepted Solution

by:
KRUNAL TAILOR earned 500 total points
ID: 40561205
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

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
print map entry 34 67
arguments to jar 5 26
Facing this issue for maven proxy setting 2 10
QQ problem 22 17
If your app took Google’s lash recently, here are the 5 most likely reasons.
You should read OS supplied guidelines before developing. I can't stress that enough. The guidelines will help you understand the reasons mobile app developers do what they do.  Apple is very particular when they review appstore submissions.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question