B4A Library LockScreen: Create your own lockscreen with just 5 lines of code

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Update: 2.0
  • Fixed: FC and incorrect handling of phone state changes (ringing, offhook)
  • Added: HomeBlocker functionality through LockScreenController.HomeBlockerEnabled property
  • Updated: Samples, manifest code and forum tutorial
Samples are renamed and updated with new functionality.
Please update your manifest code too!


@ivan.tellez check it out

 
Last edited:

ivan.tellez

Active Member
Licensed User
Longtime User
Hi

Tested and no more crashes now when ringing .

The HomeBlocker its a great feature.

There is only one drawback, when the screen is off and I press the home or power button to turn it on, the lockscreen its not there and you can see the foreground app, afther half a sec, the lockscreen appears, the notification bar slides out and the lock screen works ok.

Its there a way to avoid this behavior and make the lock screen the first thing that appears when you turn on the screen?

Thanks
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Unfortunately not yet. It depends on how instant the OS is notifying the lockscreen that the screen is turned on. Most of the times it is instant. This is a general problem that all lockscreen apps are facing.

This issue is already in my to-do list but due to its nature, I have to be very creative with my hacks I guess ...
 
Last edited:

MaxApps

Active Member
Licensed User
Longtime User
Hi I get the following error (from all 4 samples)

B4X:
Parsing code.                          0.02
Compiling code.                        0.07
Compiling layouts code.                0.02
Generating R file.                      Error
..\Assets\values-v19\styles.xml:5: error: Error: No resource found that matches the given name: attr 'android:windowTranslucentNavigation'.
..\Assets\values-v19\styles.xml:4: error: Error: No resource found that matches the given name: attr 'android:windowTranslucentStatus'.

and if I remove
B4X:
<item name="android:windowTranslucentStatus">true</item>
        <item name="android:windowTranslucentNavigation">true</item>

I get

B4X:
Parsing code.                          0.02
Compiling code.                        0.06
Compiling layouts code.                0.02
Generating R file.                      Error
AndroidManifest.xml:57: error: Error: No resource found that matches the given name (at 'theme' with value '@android:style/Theme.Holo.Light.DarkActionBar').

Kind regards
Jakob
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Last edited:

susu

Well-Known Member
Licensed User
Longtime User
I tried your sample4.apk. It seems block the Home button when I set your lockscreen as the home launcher. Howerver, it's not.
This is how I can break it: When the screen off, I press Power/Home button to turn on screen. If I press Home button 1 time, there's nothing change, I stay at lockscreen but if I keep holding Home button a little bit, the multitask will appear, I just tap on any app then I can enter the home screen without unlock your lockscreen.
 

koaunglay

Member
Licensed User
Longtime User
New teaser video. Full notification listener AND accessibility service!

https://www.dropbox.com/s/f43met2lve76s24/screencast-Genymotion-2014-08-09_04.36.35.282.avi

New teaser video. Full notification listener AND accessibility service!

https://www.dropbox.com/s/f43met2lve76s24/screencast-Genymotion-2014-08-09_04.36.35.282.avi

Please where is code for simple7? I like your video. But how can I write like that.
 

Mrjoey

Active Member
Licensed User
Longtime User
hello , im using ur great library in my music app , wish im showing the song infos and picture and some buttons on the lock screen , everything is working well , except when my app closes , the lock screen still appears , i noticed that the lock screen service still running , is there anyway to stop this service when my app stops? thanks and keep forward
 

khosrwb

Active Member
Licensed User
Longtime User
hi Periklis Koutsogiannis & hello to all
when I run the your example
show this error
you can help me , what is the problem?

excuse me for my english
 

Attachments

  • Capture.PNG
    250.7 KB · Views: 201

khosrwb

Active Member
Licensed User
Longtime User
copy these files to ur project files and make them read-only

hi Mrjoey
when I get them
this error occurred :
Access to the path 'C:\Users\khosrw\Desktop\lockscreen-1\samples\sample1\Files\lockscreen.bal' is denied.
beacuse I make them((lockscreen.bal)) read-only
 

Attachments

  • Capture2.PNG
    159.4 KB · Views: 160

omidaghakhani1368

Well-Known Member
Licensed User
Longtime User
Hi.
I download your example and run it but get error
..\Assets\values-v19\styles.xml:5: error: Error: No resource found that matches the given name: attr 'android:windowTranslucentNavigation'.
..\Assets\values-v19\styles.xml:4: error: Error: No resource found that matches the given name: attr 'android:windowTranslucentStatus'.
inside my project exist assets directory but get error
what's problem?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…