Solved

Upload Android screenshot to server.

Posted on 2015-01-20
4
261 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now