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.
Related
As many other Android developers, I'm not a huge fan of splash screens, but still most customers want them because iPhone has them or some other "great" reason.
In the android guidelines it says:
Naturally, you want everyone to quickly learn the ropes, discover the cool features, and get the most out of your app. So you might be tempted to present a one-time introductory slideshow, video, or splash screen to all new users when they first open the app. Or you might be drawn to the idea of displaying helpful text bubbles or dialogs when users interact with certain features for the first time.
Link here, first paragraph in "Don't show unsolicited help, except in very limited cases"
And now in the material design guidelines they recommend developers to use a "Launch Screen"
Because launching your app while displaying a blank canvas increases its perceived loading time, consider using a placeholder UI or a branded launch screen.
I'm guessing the android website hasn't been updated yet. Anyway, the last version of Hangouts (5.0.104...) has a very nice and quick Launch Screen. Its displayed instantly on my Nexus 5 with Marshmallow. So my question, is there an "official" way of doing this?
I've been searching for examples but can't find anything except for kind of workarounds like this example here which uses what I think is the most common approach with a Splash Screen Activity. This, however, shows a white screen when the app has been destroyed before your actual splash screen is shown.
This second example uses a theme with a window background which is shown instantly but disappears almost equally quick.
So, how does Google make the Launch screen like in Google Hangouts which is shown without delay and without any white screen before?
A colleague from my work have been in a material design training at Google HQ in London and their official way of doing it is using the windowBackground in the theme as you posted on your own question: http://antonioleiva.com/branded-launch-screen/
The idea is that the XML theme gets show very very fast by the framework, and as soon as your actual layout is loaded it will be visible.
The difference between Hangouts or even Google Maps, is that their layout is a very heavy/complex layout and they simply take longer to load than a HelloWorld app.
As your app grows and gets more complex and with more elements being initialized during Application.onCreate or Activity.onCreate, your slash screen will also be visible for longer time.
edit:
I've found a Google+ post from the official "Android Developers" profile and repost from Google engineer Ian Lake saying the same thing:
https://plus.google.com/+AndroidDevelopers/posts/Z1Wwainpjhd
https://plus.google.com/+IanLake/posts/SW7F2CJvAmU
It's because the first solution (http://antonioleiva.com/branded-launch-screen/) is changing the theme in onCreate. But the widgets of your activity are not yet rendered in onCreate. That's why you see the white screen. The second example is a good one. If you need longer time set SPLASH_TIME to longer. Check the line Thread.sleep(SPLASH_TIME) in the doInBackground function. You can wait more.
It seem that is now possible to write some text inside the lockscreen in the place where the alarm is usually written.
Please have a look red area in the below image.
This is supported on android 4.2 and up.
You need to implement it via an App Widget. You can checkout the documentation here: http://developer.android.com/guide/topics/appwidgets/index.html#lockscreen
Depending on your requirements, you could possibly use Notifications, which appear on the lockscreen.
http://developer.android.com/guide/topics/ui/notifiers/notifications.html
I need a code to use the lock screen instead of the system so that when i enter a specific password the device make the functionality that i codded it
Are you trying to implement a Lock Screen inside your app?? If so, take a look at the below links.
StackOverflow Discussion
GitHub
I am relatively new to android and want to create an application that permanently overrides androids basic softkey behaviour and view (for devices with soft keys).
Some functionalities I want to implement are changing the size of the softkeys window at the bottom, change its images, and possibly change its functionality.
For example, the user can set the size to of the softkey to be "large", "medium" or "small". And I can change the functionality of the back button to open say a particular application instead of going "back".
I'm basically looking for a high level answer as to how to do this, a basic direction of what I should read/study in order to be able to accomplish this. I realise this may require root access.
Please note that I want this behaviour to change not only in my application but I want the effect to exist on all applications. If this requires the application to be running atleast at the backend, that is fine.
After doing some decent amount of search, it seems I will have to make changes in the systemUI.apk, or possibly get its source code and modify it. Is this correct?
Thanks in advance.
I don't think even root is going to be enough for the type of changes you are describing. You're going to need to edit the Android source code and build your own system image.
Well you can't override system resources because they are part of the system image.
What you are looking for is called Home Application which can be developed like any other android app no need for root , you can find an example for it in your sdk samples.
Home Sample Application.
your app would be responsible to have UI components to send the user to all of the phone functionalities which includes:
Place for wegits
Place for apps listing (menue)
Access telephony functionality (call, phone history ...)
Access settings.
Is it a good practice to develop an app that uses the full screen?
It is not a game, full screen would be just nice to have more space on the screen for GUI elements.
But I have the dim feeling, that a full screen app could break some recommandations for good app design. The developer guide gives no answer to this. Who knows more?
I'm learning how to develop on android and it is very important for me to learn it right.
In his private blog Reto Meier(Android Book author working at Google) advises everybody to not build full screen apps. These apps will blog the clock and the notification area and this will make the user unaware of every other app they are using.
I personally even dislike the full screen mode of some ebook readers because I read those ebooks at bus stops or in the train and I need a quick look on the clock while reading a book.
Don't annoy your users just for 30px of screen estate.
If you think your design with this more space is perfect and every user will acknowledge this and wants to use it after trying it make it a setting to hide or show the notification bar. If you are using Google Analaytics you could even measure how many of your users are using this feature and then adjust the default setting.
I would say, depends on the app. Personally, I'd get a little peeved if the notification area popped down over my "Angry Birds" and ruined the shot! ;)