Custom lock screen android

Custom lock screen android

Custom lock screen
Версия: 1.4.0.0

Последнее обновление программы в шапке: 16.01.2012

Описание:
Персонализация обоев экрана блокировки.
Добавьте несколько фотографий ваших родных и близких.
Комбинируйте с элементами Metro-дизайна.
Сразу же проверяейте как выглядит экран со стандартными надписями и уведомлениями экрана блокировки.
Делитесь сформированными изображениями с друзьями.

Стандартные действия:
1. Открыть стандартный шаблон или добавить новый.
2. Изменить подложку или использовать черный цвет.
3. Добавить элементы с формой прямоугольника или эллипса.
4. Нажать элемент для редактирования содержимого и размера.
5. Нажать и перетащить элементы для правильного положения.
6. Нажать и удержать элемент для удаления, изменения размера и порядка.
7. Сохранить как изображение в галерее фотографий.
8. Делиться изображением через twitpic.com и отправить ссылку друзьям.
9. Установить сохраненное изображение в фотогалерее в качестве обоев.

Возможности:

  • создание экрана блокировки из своих фотографий в различных комбинациях;
  • проверка компоновки со стандартными надписями и уведомлениями экрана блокировки;
  • отправка изображений друзьям.

Русский интерфейс: Нет

Скачать:
XAP: Custom_lock_screen_v1.4.0.0.xap ( 614.39 КБ )
WP7 Market: zune://navigate?phoneAppID=43941d32-9db7-422b-9d24-87e62cc24ed8

Сообщение отредактировал Blackfish — 16.01.12, 16:39

Источник

How to make our own lock screen in android instead of default lock screen [duplicate]

I have an idea of creating my own phone lock app similar to android pattern lock. I need to display or start my app whenever the phone boots/restarts/phone, lock/phone, and unlock. I don’t know how to make the app appear instead of default lock screen and to hide the default lock screen. So my questions are:

    How to display or start my app instead of default lock screen

How this is helpful?

How this is helpful?

  1. How do you show the home page after my app finishes its work?

1 Answer 1

Codes that you have used in point 2 should be used as answer of your question 1. Reference is Android activity over default lock screen.

For question 2, see these relevant links:

Before answering your question 3,i would like to ask you, do you have knowledge about BroadcastReceiver? In short it is-

A broadcast receiver (short receiver) is an Android component which allows you to register for system or application events. All registered receivers for an event are notified by the Android runtime once this event happens.

For example, applications can register for the ACTION_BOOT_COMPLETED system event which is fired once the Android system has completed the boot process.

Now come to your question 4, you can show home page programmatically by this code:

And last of all i would like to provide you some links that may help you to make a custom lock screen:

Источник

Как я писал кастомный локер

Привет хабрастарожилам от хабрановичка. Ровно год назад я решил написать кастомный локер (экран блокировки) для моего старичка Samsung Galaxy Gio в стиле популярного тогда Samsung Galaxy s3. Какие причины заставили меня это сделать, писать не буду, но добавлю лишь то, что в Google Play я программу не собирался выкладывать и каким-либо другим способом заработать на ней не планировал. Данный пост посвящен последствиям моего решения.

Начну издалека. Многие хвалят Android за открытость и возможность заменить и настроить встроенные программы под свои нужды. Что тут сказать? В сравнении с другими популярными ОС, это, безусловно, так, но если копнуть глубже в архитектуру Android возникают трудности и вопросы. Локскрин (в Android это называется keyguard) как раз и вызывает вопросы: почему Google не поступили с ним, так как с лаунчерами, почему не сделали диалог со всеми доступными на устройстве локерами и с возможностью выбрать нужный по умолчанию? Где-то в глубине мозга тихим нерешительным голосом кто-то отвечает: может быть Google (Android Ink. если быть точнее) поступил так из соображений безопасности. Этот голос вероятно прав и многим разработчикам локеров и мне (скромность не позволила приписать себя к их числу) пришлось изобретать велосипед, и не один.

Читайте также:  Андроид авто hyundai solaris

Изучаем исходники

Начал я с использования одного из плюсов Android – из изучения исходников. Я один из тех консерваторов, которые уже 2,5 года сидят на стоковой прошивке (2.3.6), поэтому и исходники изучал соответствующие. Классы, отвечающие за блокировку экрана, лежат в android.policy.jar, что в system/framework. Первоначальной целью было найти «точку входа», т.е. где и когда вызывается локер. Искал здесь.

В классе PhoneWindowManager.java есть метод screenTurnedOff(int why), который вызывает одноименный метод класса KeyguardViewMediator. Проследив, кто кого вызывает, я нашел метод в классе KeyguardViewManager, создающий непосредственно View стокового локера.

Что ж, все гениальное – просто. Решил повторить этот код для своего приложения и получил ошибку – нет нужного permission. Немного погуглив, добавил следующие разрешения: SYSTEM_ALERT_WINDOW и INTERNAL_SYSTEM_WINDOW. Это не помогло.

Вернулся к изучению класса PhoneWindowManager.java:

Для требуемого окна TYPE_KEYGUARD нужно второе из моих добавленных разрешений. Задней точкой тела начал ощущать, что не все так просто, как я себе представлял. Решено было посмотреть на описание этого permission. Вот выдержка из AndroidManifest.xml пакета framework-res.apk.

Вот она – черная полоса в жизни. Ведь я понимал, «signature» – это значит, что использовать этот пермишн может только пакет, подписанный тем же ключом, что и пакет, выдавший это разрешение (в нашем случае — framework-res.apk). Ладно, достаем инструменты для изготовления велосипедов.

Версия один

Первым решением было использовать activity в качестве локскрина. На stackoverflow советуют использовать следующий код:

Признаюсь, в первых версиях я использовал этот метод. У него есть существенные недостатки: статусбар не блокируется, начиная с версии API11 этот метод не работает.

Решение первого недостатка (переполнениестека опять помогло) следующее. Поверх статусбара с помощью WindowManager рисуется прозрачный View, который перехватывает все TouchEvent. Вот служба, реализующая это:

Второго недостатка для меня не существовало, на Gingerbread данный код работал превосходно. На 4pda, куда я опрометчиво выложил свое творение, пользователи жаловались, что на многих телефонах мой локер сворачивался как обычное приложение. Для них найдено такое решение. В качестве стандартного лаунчера устанавливается пустышка. При нажатии кнопки HOME система вызывает мой лаунчер-пустышку. Если кастомный локер активен, лаунчер сразу же закрывается в методе onCreate(), т.е. визуально нажатие кнопки HOME ни к чему не приводит. Если кастомный локер не активен, мой лаунчер тут же вызывает другой правильный лаунчер, который пользователь указал в настройках.

Вот код пустышки:

Выглядело это следующим образом:

Эти велосипеды ездили долго и хорошо, пока я не решил сделать «правильный» локскрин, и уже в стиле Samsung Galaxy S4.

Версия два

Когда системе необходимо запускать кастомный локер? Очевидно, что при выключении экрана. Создадим службу, регистрирующую BroadcastReceiver, т.к. из манифеста данный фильтр не работает.

Необходимо учесть две особенности:

1. Служба должна быть запущена в момент загрузки устройства. Создадим BroadcastReseiver с IntentFilter «android.intent.action.BOOT_COMPLETED». Есть одно НО: служба при запуске должна отключить стандартную блокировку экрана. Особенностью Android является то, что стандартное окно ввода PIN-кода является частью стокового экрана блокировки. Поэтому служба должна запускаться только когда PIN буден введен.

Максимум, на что хватило моей фантазии:

2. Проанализировав PhoneWindowManager видно, что в метод screenTurnedOff(int why) передается переменная why, принимающая 3 значения:
— экран выключился по истечению таймаута (в этом случае стоковый локер запускается с задержкой),
— экран выключился при срабатывании сенсора приближения (во время телефонного разговора),
— экран выключился при нажатии кнопки.
В моем случае такого разнообразия нет. Поэтому служба мониторит состояние телефона, и при входящем звонке или во время разговора экран не блокируется.

Вот основной код службы:

Идея не использовать activity, а использовать WindowManager была еще сильна. Из пяти типов окон, использующих разрешение SYSTEM_ALERT_WINDOW, мне подошел TYPE_SYSTEM_ALERT. Причем у него были очевидные достоинства: блокировался статусбар (по крайней мере, на Gingerbread) и перехватывалось нажатие кнопки HOME (работает даже на Jelly Bean).

Промежуточным звеном между службой и KeyguardView является класс KeyguardMediator:

Дальше история становится менее интересной, так сказать, будничной. На мой локер можно добавлять ярлыки приложений (здесь все стандартно и просто) и виджеты (а вот этот момент достоин отдельной статьи).

Теперь все стало выглядеть современней:

Источник

Top 9 Tips to Cus­tomize Lock Screen on Android

Mehvish

11 Oct 2019

Android is known for its customization flexibility. Be it the home screen, app drawer, or notification panel — you can customize everything to suit your needs. Then why should the lock screen on your Android phone remain unchanged? It doesn’t. You can customize the lock screen in several ways.

Читайте также:  Андроид прошивки для motorola

The lock screen is your gateway to your phone. In its simplest form, you can access your notifications, take action on them, view date, time, and battery information on it, among other things.

Apart from that, you can use your lock screen to its full potential by following the tips mentioned here. Let’s check the lock screen tips on Android.

1. Change Lock Screen Type

As the name suggests, the primary purpose of the lock screen is to provide security to your phone by locking it. All phones offer three types of locks — pattern, PIN, and password. Choose the one that you like. Newer phones also offer fingerprint authentication and face recognition locks.

To change the lock type, go to phone Settings > Security > Screen lock. Change the lock mode type.

On Samsung phones, go to Settings > Lock screen > Screen lock type. On some phones, you will find it in Settings > Display > Lock screen. If it’s not present in any of those settings, use the search at the top of the settings to look for lock screen type.

2. Disable Lock Screen

In case you don’t like the lock screen, you can disable it by choosing None in the lock screen type. You can also use it without any lock mode by choosing Swipe. When you do so, you will have to swipe on the lock screen to open it. As evident, anyone having access to your phone can view its content.

3. Set Different Wallpaper from Home Screen

If you thought your home and lock screen wallpaper had to be the same, you are in for a surprise. All Android phones let you set a different wallpaper for the lock screen.

There are two methods to do that.

From Settings

Go to phone Settings > Display > Wallpaper. On some phones, you will find the wallpaper setting directly under Settings. Tap on it. Open the photo that you want to keep as your wallpaper and tap on Set Wallpaper. Choose Lock screen if you want to set it as a wallpaper for lock screen only.

Most of the gallery apps on Android let you set a photo as your wallpaper. Launch the photo in the gallery app and use Set as from the available options. Choose Wallpaper followed by Lock screen from the pop-up menu.

Also on Guiding Tech

How to Remove Lock Screen Ads on Android

4. Add Message on Lock Screen

The content on the lock screen keeps changing because it’s mostly from notifications. In case you want to set a message or a text of your own choice on the lock screen, you can do that.

That comes quite handy if you forget your phone somewhere, and a good-hearted soul finds it. Typically, if your phone is locked, they wouldn’t be able to know about the owner of the phone. But if you have kept your contact information such as email id or phone number as a message on the lock screen, they can find you easily.

To set a lock screen message, go to Settings > Display > Lock screen display (check under Advanced) > Lock screen message. On Samsung phones, go to Settings > Lock screen > Contact information.

5. Add Users from Lock Screen

Most of the Android phones, other than the Samsung made, support multi-user accounts. With this feature, each user has a separate space on your phone. To add or switch users, one has to go to Users Settings typically and then add a user. But there exists a setting that lets you add users from the lock screen directly.

To enable this setting, go to Settings > Display > Lock screen display (check under Advanced) > Add users from lock screen.

Once enabled, you will find the user icon above the quick settings. Tap on it to view other users.

6. Disable Notification Content

Even if your device is locked, your notifications show up on the lock screen. While some people prefer it that way as one doesn’t have to unlock the phone to dismiss or view a notification, others loathe it due to privacy reasons. Fortunately, you can choose to show all the notification content or hide it.

Читайте также:  Отладка андроида через компьютер

For that, go to Settings > Display > Lock screen display > Lock screen. Choose the required option.

On Samsung phones, go to Settings > Lock screen > Notifications. Enable the toggle for Hide content if you don’t want to show notifications on the lock screen. You can also choose the notification style.

7. Automatically Unlock Device

Android phones have an exiting feature where your phone stays unlocked when it meets certain conditions. For instance, the lock will be disabled when you are at your home or when the phone is in your hand. This feature is called Smart lock.

To use it, go to Settings > Security > Smart Lock. Enter your existing lock code and then choose the smart lock mode. In case the smart lock doesn’t work on your phone, try these fixes.

Also on Guiding Tech
# Tips & Tricks

8. Customize Lock Screen with Third-Party Apps

Other than the built-in functions for lock screen, you can customize it further using third-party apps. You can apply themes, change notification style, add more content using these apps. Some of the good lock screen customization apps are:

9. Bonus Tips for Samsung Users

Here are some special customization tips for Samsung users:

Change Lock Screen Clock Style

Almost every user checks time on their phone’s lock screen. That’s why Samsung offers the ability to customize the lock screen clock style.

For that, go to Settings > Lock screen > Clock style. Select your clock type and customize the color.

Enable Lock Screen Stories

Want to see an informative lock screen with a different picture every time you unlock your phone? Say hi to lock screen stories. To enable them, go to Settings > Lock screen > Lockscreen stories.

Also on Guiding Tech

How to Set Cool GIF as Lock Screen Wallpaper on Android

Bad Times

With the arrival of authentication modes like fingerprint sensor and face recognition, our interaction with the lock screen has reduced. The features like always-on display have also taken away the limelight of the lock screen. Whatever remains of it is still customizable in the ways mentioned above.

Do you know of any other way to customize the lock screen on Android? Let us know in the comments below.

Next up: Is Google Assistant bothering you on the lock screen? Know how to disable it on the lock screen on Android.

Last updated on 11 Oct, 2019
The above article may contain affiliate links which help support Guiding Tech. However, it does not affect our editorial integrity. The content remains unbiased and authentic.

Top 5 Fixes for Android 11 Screen Recorder Not Showing Up

Is the Screen Recoder feature not showing up on your # Android 11 phone? Check out 5 ways to fix the Screen Recorder missing issue on # Android 11.

Top 7 Fixes for Chat Bubbles in Android 11 Not Working

Are you unable to use # chat bubbles on your # Android 11 phone? Here are 7 ways to fix # Android 11 # chat bubbles not working on your # Android 11 running phone.

What Are Lock Screen Stories and How to Enable or Disable on Samsung Phones

Are you seeing random photos on your # lock screen? Know about lock screen # stories on # Samsung. Find out how to disable # stories on Samsung phones.

3 Best Lock Screen Apps for Android That You Should Try

Here’s are a cool collection of # Android Apps to jazz up your # lock screen. Read on!

Reviewing C Locker, a Flexible Custom Lock Screen Replacement for Android

Reviewing C Locker, a Flexible Custom Lock Screen Replacement for # Android.

How to Customize Lock Screen on Samsung Galaxy Devices

# Samsung offers several customization options to personalize the # lock screen on the # Galaxy devices. Read the post to learn every possible option to customize the # lock screen.

How to Set Cool GIF as Lock Screen Wallpaper on Android

Here’s a quick how-to on setting a cool GIFs as a # lock screen wallpaper on your # Android. check it out!

Top 7 Ways to Fix Screen Rotation Not Working on Android

The # android # screen stopped rotating all of a sudden? Check out these tried and tested ways to fix screen rotation not working on Android.

Did You Know

In 1981, the crew of STS-43 Atlantis sent the first e-mail from space.

Источник

Оцените статью