?
Solved

Upload Android screenshot to server.

Posted on 2015-01-20
4
Medium Priority
?
362 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

A short article about a problem I had getting the GPS LocationListener working.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
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.
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

752 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