Does anyone knows how TeamViewer gets screen capturing?

Does anyone knows how TeamViewer gets screen capturing?

  • I'm looking for an way to record my Android's screen without rooting my phone. This will be on my work phone, so I'm not allowed to root it. I recently found TeamViewer QuickSupport which lets you control an Android phone remotely, Surely someone's made an app that uses the same API that TeamViewer uses to retrieve the screen ? I mean, TeamViewer is recording it and sending it over wifi with no trouble, so why do actual screen recording apps require root? Does anyone knows how that tool gets screen capturing ? Any advice? Thanks

  • Answer:

    getting from http://stackoverflow.com/questions/3067586/how-to-capture-the-android-device-screen-content Use the following code: Bitmap bitmap; View v1 = MyView.getRootView(); v1.setDrawingCacheEnabled(true); bitmap = Bitmap.createBitmap(v1.getDrawingCache()); v1.setDrawingCacheEnabled(false); Here MyView is the View through which we need include in the screen. You can also get DrawingCache from of any View this way (without getRootView()). There is also another way.. If we having ScrollView as root view then its better to use following code, LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE); FrameLayout root = (FrameLayout) inflater.inflate(R.layout.activity_main, null); // activity_main is UI(xml) file we used in our Activity class. FrameLayout is root view of my UI(xml) file. root.setDrawingCacheEnabled(true); Bitmap bitmap = getBitmapFromView(this.getWindow().findViewById(R.id.frameLayout)); // here give id of our root layout (here its my FrameLayout's id)

Prashant at Super User Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.