语言

Menu
Sites
Language
Locking the screen programatically

how to lock the screen  programatically in tizen

Iam providing one authentication form  with pass word text field ,when the user enters the password  (check password from database)when it fails ,the  Screen

( corresponding form )  should be locked untill i will give correct password.

plz guide me by providing the code

编辑者为: P puvvada 17 10月, 2013

响应

16 回复
Alex Dem

Hi,
FYI I was unable to launch Tizen Lockscreen App with ID 'org.tizen.lockscreen' directly via LaunchApplication and I do not find api to perform this action in Tizen::Shell::LockManager class, It allows unlock only.
Alexey.

kimi

AFAIK there are no API to lock the screen! And also to unlock you need platform privilege.

 

Kimi,

P puvvada

thank for your suggestion and iam looking for alternative like disabling hardware buttons like home ,back,power button

is it possible plz guide me

 

Alex Dem

Hi All,
Sorry for my previous response. I just forgot  to add 'http://tizen.org/privilege/application.launch' privilege in manifest.
After this I was able to start lockscreen app directly from my native App.
    AppId callerAppId = L"org.tizen.lockscreen";
    AppManager* pAppManager = AppManager::GetInstance();
    result res=pAppManager->LaunchApplication(callerAppId, AppManager::LAUNCH_OPTION_DEFAULT);
Alexey.

 

P puvvada

Thanks a lot now it is working perfectly ,Can you plz guide me to disable the Hardware butons

Pushpa G

For back button, you can disable it by not adding the listener to it in your app

Dont use SetFormBackEventListener(this);

P puvvada

is there any way to disable home and power button

Alex Dem

Hi,
just fyu,
home and lock-screen appIDs could be different on different devices (M0/M1/Commercial) so to obtain them in Native apps you could use:
 

Tizen::Base::String _homeAppId, _lockAppId;
SettingInfo::GetValue(L"http://tizen.org/setting/application.home", _homeAppId);
SettingInfo::GetValue(L"http://tizen.org/setting/application.lock", _lockAppId);

Alexey.

P puvvada

Instead of launching the lock aplication is there any way to lock the Screen

P puvvada

Can we launch Locking aplication with password programatically (no setting should be done)

Plz guide me it is urgent

Alex Dem

Hi
Simple way:I could suggest to use Tizen::Ui::Controls::Popup to lock your App with Edit/Text Box to input password for unlock.
Alexey.

P puvvada

Hai

if i use popup and if i press home button my app goes to back ground ,then  i want to disable home and power button

ie when i press home and power button the app should not go to back ground (disabling  home and power button)
 

Alex Dem

There is one known way (for Home button): You should set for frame highest priority on initialization
Tizen::Ui::Window::SetZOrderGroup(WINDOW_Z_ORDER_GROUP_HIGH)
and handle home button manually inside OnKeyPressed of IPropagatedKeyEventListener.
But you need platform privilege level for SetZOrderGroup api.
Alexey.

P puvvada

Is there any way to use platform previliges

 

Alex Dem

No, it is impossible.
Alexey.

Alex Dem

No, it is impossible.
Alexey.