11

There is a mention about Screen capture and Sharing api in Android 5.0 at: Android 5.0 APIs

There its mentioned about MediaProjectionDemo class in the ApiDemos. I could not find it anywhere to download. Where can I find it? Are they yet to publish API demos for Android 5.0?

arjoan
  • 1,819
  • 1
  • 20
  • 38

3 Answers3

5

I found the source code here:

Pratik Butani
  • 51,868
  • 51
  • 228
  • 375
Kerem Kusmezer
  • 432
  • 6
  • 14
  • how can one simply save this recording in a .mp4 file using this code, do u have any idea? – KunalK Nov 16 '14 at 06:17
  • @KunalK : i also need the same thing. Have you got any help about this? – SAIR Jan 29 '15 at 14:08
  • Nope not yet. Working on some other things so didnt get chance. – KunalK Jan 29 '15 at 14:17
  • in the thread https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=77791 on #6 point 3 he has mentioned how to go about it. but i didn't get it. – SAIR Jan 29 '15 at 14:33
  • Hi people, did you figure out how to save the file? It would be of great help! – Nick Nov 29 '15 at 20:38
4

I have just downloaded the 5.0 SDK in my Eclipse Android Development environment.

Makesure that you have downloaded the complete SDK apart from some system Images which you dont require.

If you have downloaded the SDK, then create and emulator device with Android 5.0.

In that, go to Apps---> API Demos ---> Media ----> Media Projection.

I can able to see the Media Projections App.

Akhil
  • 187
  • 7
  • 3
    I think he's asking for the _source code_ for that demo. I couldn't find it anywhere either. There's an open issue about this: https://code.google.com/p/android/issues/detail?id=77791 – Vicky Chijwani Oct 28 '14 at 17:14
  • If you don't want to download the project you can also access it here https://github.com/googlesamples/android-ScreenCapture – aglour Oct 21 '15 at 11:11
1

I was going through the solutions available on web to take screenshot, So I found some really helpful which I would like to share here:

1) Here is the MediaProjectionAPIDemo available on github

2) Here is another Project using MediaProjectionAPI available on github

3) Another solution which require NDK to stream real time Screen Capture

4) And at last, here is Android Screenshot library

Hope it will help you to take off :-)

Farhan
  • 1,699
  • 19
  • 22