Solved

Upload Android screenshot to server.

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Often, people trade privacy and security for convenience. However in today's concrete jungle, this is an extremely foolish decision considering the vast amount of technologies being used against consumer interest. First off, I won't waste any time e…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

820 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