What you really want is a Widget for quick access, here are some examples
link
You must take into account that security can only be enabled from the security settings.
You must define the attribute in your appwidget-provider
to determine if your widget appears on the screen.
link
The widgetCategory
attribute declares if your Widget application can be
display on the home screen ( home_screen
), the screen of
block ( keyguard
), or both. Only Android versions
previous to 5.0 support lock screen widgets. For Android
5.0 and higher, only home_screen
is valid.
The appwidget-provider
to define your Widget application must be defined within the folder res/xml/
.
and this is an example
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="40dp"
android:minHeight="40dp"
android:updatePeriodMillis="86400000"
android:previewImage="@drawable/preview"
android:initialLayout="@layout/example_appwidget"
android:configure="com.example.android.ExampleAppWidgetConfigure"
android:resizeMode="horizontal|vertical"
android:widgetCategory="home_screen">
</appwidget-provider>
link