How to use the Android lock screen - android

I want to create an Android application that interacts with the user when the phone is locked
For example the Sony Xperia U (android 4.something) the default mp3 player displays in the lock screen, above the pattern, the name of the song and buttons play, pause, next. In Huawei P8 lite the player displays the aforementioned buttons + the background picture album in an separate screen when you press the power button, and when you slide, it shows the pattern.
I want to do something similar, to display messages from the application to the user, who can press buttons to interact with the application when the phone is locked.
Can this be done without creating new lock screen; (I'm afraid I will do something stupid and lock myself out)
If yes, what activities / permissions / libraries etc should be used;

Related

Android TV - resume already started content from home

I am new to Android TV programming and just managed to have an App that starts a video from an ExoPlayer implementation.
When I hit the HOME-button the home is shown and the content I started appears in the purple marked area. I can resume my App from here.
TV Emulator - Android 10
Can you tell me how this area is called?
How can I control which meta data is shown?
I only found information about the Watch Next Card, but it seems to be something different.
That seems to be the notification area. It's not exclusive to playback.
For example, notifications for a firmware update will also appear there.
To have a proper now playing car and display metadata and other info see this:
https://developer.android.com/training/tv/playback/now-playing.html

Android how create second active screen and show in another display like TV, Monitor?

I want to display the app screen on another display( Not a screen mirror). Another display is connected to mobile through USB C3.1 - HDMI. (Like TV, Monitor ). 
While displaying one screen to TV,  Same time I want to use another screen of the app on my mobile. (The Same time 2 screens will be active 1 screen in mobile and another on TV)
Use case example: If I am playing a game, GamePlay view will display on the TV and Gameplay buttons will display on my mobile.
Example: https://www.samsung.com/us/explore/dex/
Please suggest a way to implement such a feature in my android app.

How to support dual screen on android with an interactive screen?

I am making a game running on an android phone with an interactive station, the station looks like an interactive screen, when the phone connected to the station ,the station would show the same desktop content as phone and can launch app and do anything as same as phone ,it can also launch different app on phone and station respectively. I wanna achieve that launch my app and can see a different view in phone screen and station screen, both phone screen, and station screen can receive user input event.
I have tried to use,
ExtCamera.SetTargetBuffers(Display.displays[1].colorBuffer, Display.displays[1].depthBuffer);
to output what ExtCamera view to the secondary screen.
I can see different camera view in the station screen and phone screen, but the station screen can not receive user input, I wonder it because this method is only to render a texture to screen so it can not receive user input ? or there is another way to achieve this goal? I knew that android native offer class presentation to support multi-display, but it seems a large workload between android and unity to interact.
Any help would be appreciated!

Android lock screen / media controls on the lock screen

i have a few questions, to which i haven't found answers till now, despite searching the forum and much of googling.
On thing first, i'm developing for android gingerbread, so newer/not all functions are available.
Is it somehow possible to force the lock screen to redraw/update?
Can i somehow manipulate the built-in media controls on the lock screen, which appear when i'm playing music, through a function/an intent or something? For example that the media controls show the pause state (only the play button is shown) instead of showing the play state (3 buttons are shown). Because i'm developing for gingerbread, i cannot use the RemoteControlClient.
Can i somehow dynamically disable/unregister the appearance of the media controls on the lock screen through code? The media controls on the lock screen shall not be shown despite playing music.
EDIT
Upon the answer of CommonsWare, for the second and third question, i use a cyanogen mod rom, so the media controls are comming from cyanogen.
Is it somehow possible to force the lock screen to redraw/update?
Not really.
Can i somehow manipulate the built-in media controls on the lock screen
Can i somehow dynamically disable/unregister the appearance of the media controls on the lock screen through code?
There are no "built-in media controls on the lock screen" in Android 2.3. Certain devices from certain device manufacturers may have extended their lockscreens support media controls, in which case you would have to ask your questions of those device manufacturers.

Android: Recognising Gestures when screen is locked

I am currently in the process of creating an MP3 player. In particular, the main mode of user input is in the form of (touchscreen) gestural input. I would like to add the functionality allowing users to continue interacting with the MP3 player when the screen is locked. That is, how can I get the device (A Galaxy S3 in particular if it's worth mentioning) to recognise gestures in the lock screen and "parse" them to the MP3 player?
Note: by "locked" I mean when one can see the lock screen (i.e. not when the screen is turned off).
How would I go about doing this?
Thanks in advance.
The recommended way is to make Lock Screen Widgets. These are widgets that allow you to interact with apps in the lockscreen such as the Google Play Music app.
Check out the official tutorial here:
http://developer.android.com/guide/topics/appwidgets/index.html#lockscreen

Categories

Resources