04-13-2010 06:38 AM
Hi, I have the following code works great in version 4.5, but it does not work in version 5.0, is there any problem with new OS version 5.0? Or this command has been replaced?
ApplicationManager.getApplicationManager().lockSys
Thanks!
04-13-2010 09:04 AM
It might be depreciated because up until, and including 4.7 the function has a comment for the "force" parameter. In the current 5.0 API the "force" parameter simply says depreciated. Maybe they put it in the wrong place, maybe it actually is depreciated. I don't know a fix, sorry.
05-13-2011 04:31 AM
Hi
Actually lockSystem( force ) is working with OS version lesser than 5.0.
In ApplicationManager.lockSystem( force ), parameter force is deprecated not api.
There are mainly two point.
01. In ApplicationManager.lockSystem( force ) parameter force is deprecated not api so, api should work in 6.0.
02. force parameter is deprecated in 6.0 not 5.0 so, it must work in 5.0.
Waiting for reply.
05-24-2011 05:36 AM
Its working with my device.. I am using bold 9700 with os 5.0.0.593...
05-25-2011 01:07 PM
R u sure .?? As many have reckon its not working and is depreceated in BB OS 5.0 onwards.
And if its working is it a workaround or simple API as needed.
ApplicationManager.getApplicationManager().lockSy
Kindly let us know.
Cheers
~Abhi
05-26-2011 02:40 AM
yes it's working.
appManager=ApplicationManager.getApplicationManager();
if(!appManager.isSystemLocked())
{
appManager.lockSystem(true);
}
I am using only these code and it is working fine with my simulator as well as with my Device...
05-26-2011 04:26 AM
Thanks for responding.
I tried the code with Application Permissions... No luck..
I have tried 2 solutions :
1 . With Your code ---- > I get Controlled Access exception when I try to lockSytem on BB 5.0 Simulator and device.
I therefore added application permissions programmatically but now I get Runtime exception .
I understand invoking application permissions needs some mandation like it be invoked before app enters event dispatcher.
2. I tried using Event Injector for LEY_LOCK ..-- Surprisingly this doesnt work . It works for other keys like KEY_END.
Awaiting for your kind suggestion and request.
Cheers,
~~Abhi
05-27-2011 01:12 AM
Forget to mention that It's locking the device if and only if you set the password for device..
05-31-2011 05:07 AM
Ok thanks I shall try and let u know.
However the device locks as such if kept idle for a while.
That does means the password is set .
Cheers,
Abhi