Since ICS it became really easy to take a screenshot from within Android. In the presentations Google goes further than that by streaming/saving the whole content that is shown on the screen including sound directly from the device. How to achieve that? Do I need some extra HDMI certified screen grabbing cards consoles require?
Related
The problem:
I'm developing an app for Android Auto and I would like to show some information on the secondary screen/display (if available) the same way some navigation and music apps do.
For example: Some cars have heads-up-display or a tiny screen in the dashboard that acts like another screen and is used by navigation apps to show turn-by-turn information.
Music apps generally uses this feature to show information about the music being played.
What I want:
My use case will be similar to the music app, I want to show some text and maybe a little image/icon, but in order to do that and adapt the layout to the screen format I need to know:
There is a secondary screen? YES/NO
The screen type.
The secondary screen size. ( width and height )
The secondary screen resolution and dpi
What I already tried:
Searched the entire Android Developer site and forums but didn't find anything on how to get those properties when having a secondary screen.
Most articles only explain multi-window behavior or things related to resize an app when an external display is connected.
Here are some links showing similar results of what I want:
Android Auto: Maps showing turn-by-turn on HUD
Android Auto: Maps showing turn-by-turn on Tiny screen on dashboard
I am trying to take a screenshot of my android device programmatically.
I have found dozens of Questions and posts, years old and not current. For example:
How to programmatically take a screenshot on Android?
The Approach works in the way of taking a screenshot of my main application window. But I I want to take a screenshot of the whole device including other apps!
example:
Instead of the "Internal Storage" + Control overlay, the original app is recorded or alternatively, the tiny view of the control overlay.
Anyone an idea on how to record the current screen? I'm fairly sure there must be solutions as there are apps out there such as the following screen recorder:
https://play.google.com/store/apps/details?id=videoeditor.videorecorder.screenrecorder&hl=en
I'm developing an app that is like a whiteboard.
I'm able to mirror the screen through Chromecast, but this way the whole screen is streamed.
But I want that only a part of the screen be streamed, as I have the whiteboard itself and a toolbar that shouldn't be on the streaming.
Is it possible to choose what Views should be streamed on Android?
No. Streaming works via the video recording apps, it grabs the entire screen's data. At that level it doesn't even know views exist.
Yes, it is possible. You should use the Remote Display APIs from Cast SDK v2 where you specify what view/surface in your app should be mirrored on a cast device. It is a great match for what you want to do.
i'm developing an app and need to make Activity that take snapshot from current content of device screen.
note: i dont want take picture from my activity content or some view, i want take a picture from all of device screen content. ( like home screen or every applications that are on foreground). i googled many times and search so much.
there is an example code:
View screen = (View)findViewById(R.id.screen);
screen.setDrawingCacheEnabled(true);
bmScreen = screen.getDrawingCache();
showBitmap(bmScreen); // function that show my bitmap image
with this code can capture my activity's view, but i dont want capture onlye my activity. i want make a thread that capture device screen with all of its contents.
can everybody help me please?
You can't do this, mostly for security reasons. If this were possible, some rogue app could silently capture and send somewhere screenshots of everything you are doing on your device.
Why this is not available to non-system apps:
Android let's SDK applications do certain things, and explicitly forbids others. An app is not supposed to read another app's data and similarly an app cannot capture another app's screen. Google has explicitly said that third party apps are not supposed to take screencaptures of other apps. The lack of screen capture API's is a deliberate decision, not an omission. ICS offers screenshot functionality, but it is implemented by the system, and requires a hardware trigger in order to make sure it cannot be started or accessed by third party apps.
While there are ways to do this, they either require root (to read the graphics buffer directly, which is device-dependent), or are not guaranteed to work on all devices/versions.
Does Android have the software capabilities to, if a phone has video-out, to open or push content solely to the video out.
So for example if the user is in and clicks on a YouTube link, the app, instead of opening the content on the main screen over the app it would push it to the video out so the YouTube video would display on their connect display and they could continue to browse.
I know Motorola's have the WebTop software and this idea is similar to what I am trying to accomplish but on a much more basic level. It's more similar to Apples AirPlay but much less complex again (without a network/external player - just video out).
Or if even that is to complex an even simpler solution of having the video-out still output even when the phone is locked. Currently the video-out mirroring on both my HTC Incredible and Galaxy Nexus will stop when the phone is locked.
EDIT:
I've noticed while using my phone that playing a video through the Google Videos app that on the phone controls will overlay on the screen i.e. play, pause, seek bar, and, the soft buttons, but the video-out display (Television) plays the video continuously/seamlessly without any of the controls over-layed. Now this is very primitive example of what i'm ultimately alluding too but it does show a real world example of an android device (no 3rd party manufacture software) doing video out that isn't exactly mirroring.
Well... I hate to furnish this as an answer, but it really looks like there's simply nothing in the API for it at all...
http://groups.google.com/group/android-developers/browse_thread/thread/9e3bcd1eea2c379
which just redirects to:
https://groups.google.com/forum/#!topic/android-developers/Jxp_9ZtzL60
I'm definitely going to favorite this question, and hope someone chimes in with something more useful than a "doesn't look like it's possible, though that does appear to be the correct answer, at this time.
Much like Dr.Dredel has mentioned, there is nothing current for multiple displays in terms of display 1 showing 'A' and display 2 showing 'B'
There is support for multiple screen sizes per the following:
http://developer.android.com/guide/practices/screens_support.html#support
This will be the case for a little while longer until someone creates the support for it.