Android - Adding my app's buttons to the lock screen? - android

This is my first Android app, and first java app in general so the more detailed the answers/examples the better.
I've got three buttons in my app. I'd like these same three buttons to be accessible on the lock screen. They're not media controls, but actual buttons that when pressed fire up or interact with a running thread.
Any suggestions? Links to examples? Thanks.

Follow Google's documentation
https://developer.android.com/guide/topics/appwidgets/index.html

Related

Cool Horizontal tool in android UI

I was surfing some apps couple of hours ago and I saw something common in all of them. One clear instance for that is when you open YouTube app you see a narrow horizontal tool just above the device's home button which seems to be in charge of controlling what page user want To go I guess.
It has search button, a button which leads to the home page of the app and etc.
Question: Is it just a strip with buttons which is used to switch between activities ( by Intent class)? Or something else?
my bro you should use some library for apply this such as chip navigation
if you interest to learn it recommend you to see this tutorial https://www.youtube.com/watch?v=DQtdOSN21lQ&feature=emb_logo and the library https://github.com/ismaeldivita/chip-navigation-bar
Do you mean the bottom app bar?
If so you'll find the details here: https://material.io/components/app-bars-bottom
And yes you can use it to switch between activities.

create live wallpaper in viewpager android apps

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.

Android: HomeScreen

I'm currently developing a simple android HomeScreen with just 1 page.
I would like to know how to enable my HomeScreen to run and display widgets like this free widget.
Thanks so much in advance!
The best way you can use it, just get sources of Launcher application and find how AppWidgetHost added to view hierarchy and how it is maintaining AppWidgetHostView instances.
Launcher sources you can get here:
Laucnher.git
The home screen widgets are added by users based on the free-space they have and where they want the widget to be placed in their home-screen. As a developer you can only provide a widget, but adding that to the home-screen is purely in the control of the user.

How to customize Android's LockScreen?

I know that there is already some apps can do this, such as:
WidgetLocker Lockscreen
Flyscreen
I want to know how to do this in my app? What classes I can use? Or what articles I should read? I don't want to change the Android's source code.
And I wonder if it will be different to deal with when the screen is locked by draw pattern?
Have a look at this answer. You need to write your own home screen app which will implement the lockscreen behaviour that you require. There is sample code for writing your own home screen app in the Android SDK.

how to write word for app on screen

I want do an app,i want it look the same as this one:
I don't know how to write the word "writing" as the red mark ,and how to add the app icon on
the screen.
The answer is simple and yet annoying: It is not possible using the standard lock screen. Source of Android's lock screen describes where to find the source code of the default lock screen, and if you look into the source code of LockScreen.java you will find out that this information is hard coded. So basically you will have to wait for a new Android version to support this feature or program your own lock screen, which kind of misses the point. :-/
I only found a comment in the docu here that it could be possible to add a widget to the lock screen sometime. Any than this I found some apps that deliver a complete alternative lock screen.
So my guess it, that the clock on your screen is only able to show the info on the lock screen due to an extra (HTC?)-API that is not available for third party developer as suggested here: https://stackoverflow.com/questions/3556430 too.

Categories

Resources