01-05-2011 02:18 PM
I’m having an issue with “The application Demo is attempting to reset the Security Timer.” dialog appearing during playback of a video file. Only some devices appear to do this, I have been seeing this occur on a BlackBerry Torch 9800 version 6.0 Bundle 278, developing using BlackBerry JRE 5.0.0.
What is confusing is that the media player displays the message, but only if a restricted API is included in the application (even if the restricted API is not called) and the application needs to be signed.
Going into the Device -> Application Management -> selecting the application then setting Permissions to Default (which then displays Custom) will cause the message to appear. Changing the setting to Allow will mean the “…is attempting to reset the Security Timer.” no longer appears.
However, our team is concerned that the appearance of the message will be concerning to consumers and spoil their experience.
As a test, I used the BlackBerry EmbeddedMediaDemo Sample, which played the blackberry video without the “Security Timer” message appearing. However, adding any code that results in signing to be required will then cause the message to appear during playback.
E.g.. adding int width = Display.getWidth() inside the constructor:
EmbeddedMediaScreen screen = new EmbeddedMediaScreen();
int width = Display.getWidth();
From the stack it appears that the Media Player is attempting to enable the backlight:
Message(Object).wait() line: 480
Proxy(Application).invokeAndWait(Runnable) line: 3046
BackgroundDialog.showOnProxy(PopupDialog, int, boolean) line: 642
PermissionDialog.getPermission() line: 145
ApplicationControlDialog.getPermission() line: 56
ApplicationControlImpl.doPromptWork(int, ResourceBundleFamily, int, int, int, int, PermissionPromptDialog) line: 3436
ApplicationControlImpl.doPromptWork(int, ResourceBundleFamily, int, int, int, int) line: 3256
ApplicationControlImpl.doPromptWork(int, ResourceBundleFamily, int, int, int) line: 3219
DeviceInfo.canResetIdleTime() line: 759
Backlight.resetIdleTime() line: 280
Backlight.enable(boolean, boolean) line: 83
Backlight.enable(boolean) line: 108
MMAPIMediaField$BacklightTimer.run() line: 475
TimerThread.mainLoop() line: 437
TimerThread.run() line: 375
Any insight on why the media player displays this message on signed applications, and if there is any way to avoid the message appearing would be much appreciated.
02-10-2011 04:05 PM
I've run into the same problem and was wondering if you had come across a solution or work around. In my case, the video is very short, so simply preventing the Media Player from attempting to reset the idle timer would also be an acceptable solution.
Right now my only "solution" is to check the application permissions prior to playing the video and skip playing it if a warning dialog will be displayed.