complete noob to android. Trying to make an app in which I am trying to use the presentation class to display the home screen on the secondary display .... in short I'm trying to make the secondary display the primary display... I've tried a few hack such as making an overlay screen but it somehow doesn't work ... is there any way to get reference to the display object of the home screen....so i can use that to display it on the secondary display... please help guys :D.
is there any way to get reference to the display object of the home screen
No. That is not your app.
The exception would be if you write your own home screen and integrate it into this Presentation app.
You are welcome to use the media projection APIs on Android 5.0+ to take screenshots of the primary display, to show in your Presentation. However, all that will do is accomplish the same display mirroring that is part of standard Android (and be slower as well).
Related
I'm making a toddler game and trying to prevent them from accessing the rest of the phone from within the app. I know you can overload the back key on the menu but how about the other 2 keys? I just want to add a confirmation screen that only adults can deal with so toddlers wont be able to mess with the phone and get out of the app.
Hi you should use the "kiosk mode" features present on Android sdk. Take a look here.
I'm currently working on what you could call a pet project, in which I need to display the camera. I've gotten that to work so far, but the idea behind it requires the view of the camera to not take up the entire screen. How can I "limit" or attach it to some other object/view that I can limit in size so as that I don't take up the entire screen, and thus I can add text/buttons/etc that the user can interact with while at the same time viewing the camera content?
You'll have to use some different native APIs to get a view that can show the camera feed. This is a different approach from using something like the Media Plugin which shows the built-in platform cameras. For example, you would use AVCaptureSession for iOS. Luckily, we have a doc on doing just what you want here. The example code is quite large so I won't paste here. There is a GitHub project you can explore for the full source code here.
The basic idea is to create a renderer for the platform APIs that give you access to camera data that can be embedded in a view.
iOS:
AVCaptureSession, AVCaptureDeviceInput and AVCaptureStillImageOutput
Android:
SurfaceTexture and TextureView help
Hi i have a app contain 3 page. and i want to set one page as background like android home screen. I search in google and i found this and this
tutorial's but i couldn't use it for my target can anyone show me another better example thanks.
i mean How can i create app like android home screen which have one picture for 5 pages background (in my phone).
at last i found my answer and that was so simpler that i think.
that was not a live wallpaper that was simple trick using scroolview for background of main layout and listen to onPageScrollStateChanged.
that's it.
i am doing some processing in the background in my app and i am in need to show a small indicator what the app is retrieving data from the server. in a perfect world i would use an animated gif but since google decided not to support it i need a solution. i don't want the build-in dialog box that prevents the user from using an app. i need to be able place it anywhere on my layout and show/hide it when i need to. my app runs on 2.2+
any help is appreciated :)
Use ProgressBar.
My question today relates to the android home screen and where it stores icon / widget positions. Specifically, I am interested in accessing the positions and sizes of any icons that are currently being displayed. I have, so far, been unable to find a method of retrieving the positions of other applications but i figure it must be possible in some way due to the presence of third-party home screen applications.
Ideally, I am hoping to query the positions of whatever is on the screen at the moment from a live wallpaper and adjust my rendering accordingly.
Thank you in advance for your time.
There is no way as far as I know of doing this. You may be able to contact the developer of the homescreen (if it's not the default one or senseUI) and have them expose an API to do this.
Third party homescreens draw all the icons themselves. They REPLACE the original homescreen, they don't just put a theme on top of it.
You should just create your live wallpaper and if the user wants to see it instead of homescreen icons or widgets, they can move them. It would be impossible to take into account all the widgets and crap on the screen.