08-23-2010 03:35 AM
I do have the following behavior on a 8900 v188.8.131.52 when calling VideoControl#getSnapshot:
- the view finder is correctly displayed;
- there is a ControlAccessException when taking the snapshot: vc.getSnapshot(imageType), with either imageType=null or imageType = "encoding=jpeg&width=1024&height=768&quality=super
Note that this code works fine:
- on my 9700 v5.1;
- on 8900 simulator: as often we cannot trust BlackBerry simulators.
Could you help me?
Thanks & Regards
I already had a look at the following topics:
08-24-2010 03:09 PM
Have the appropriate application control policies been set for your application? You can view them by going to Options, Applications, selecting your application and choosing Edit Permissions.
Note that by default, application control policies are not enforced by the BlackBerry Smartphone Simulator, which is why you may see a difference.
You can use the following steps to enable device security in a BlackBerry Smartphone Simulator, which will enable the security options above. The steps vary based on whether you are using the BlackBerry Java Plug-in for Eclipse, BlackBerry JDE or stand alone BlackBerry Smartphone Simulator.
08-25-2010 10:17 AM - edited 08-25-2010 10:17 AM
Thank you very much for you help. It is very helpful to me .
Unfortunately, I do not have the same issue with the simulator :\.
I managed to have a BB 8900... but the debugger works very badly with this phone :
- does not stop on break points;
- variables cannot be displayed.
Moreove I have to use Desktop Software each time to delete my application otherwise the debugger does not attach.
I am developping under Eclipse Java 3.5.2 with the last BlackBerry plug-in.
BB 8900 is very very bad and unstable phone . It is a punishment to develop for it .
08-25-2010 01:46 PM
You shouldn't see the issue in the simulator unless you have enabled device security, as I describe above.
Or are you saying you did enable it, but the issue doesn't occur there?
Have you configured permissions for the application under Options, Applications, select your application and choose Edit Permissions from the menu?
Are there any IT Policies on the BlackBerry Curve 8900 that restrict camera or media use?
08-26-2010 03:08 PM - edited 08-26-2010 03:11 PM
thank you very much for your help .
What I meant was that the issue does not occur on simulator, and since debugging on the mobile does not work... I was stucked!
So I tried to invoke the Camera instead.
This works fine on simulator and 9700, but again not after I take a picture (while listening for file change or after, I cannot know) on 8900, and since debugging on this mobile does not work... I am stucked again and pretty disappointed!
Is there any media thing that works well on this mobile???
Hopefully I talked to my client in the afternoon and he may decide not to deliver the application for this non-working phone (I will not charge him for that)... and maybe even not to continue having applications developped for BlackBerry. Anyway, this will be my first and last development for BlackBerry, having lost so much money .
Thanks & Regards
08-27-2010 03:07 AM - edited 08-27-2010 03:36 AM
1/ I've juste tried my code on a 9700 and it does work... So it is really an issue with 8900.
This phone is really not reliable .
2/ By the way, I could not find any API to close the Camera application I invoked. Could you help me?
For the moment I simulate 2 presses on the [Back] key:
// Invokes the Camera application
Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA, new CameraArguments());
// Tries to close the camera (not a nice way but I could not find any better)
// by simulating 2 presses on the [Back] key
EventInjector.KeyEvent inject =
... what requires PERMISSION_EVENT_INJECTOR.
This is something very strange: PERMISSION_EVENT_INJECTOR is deprecated, but EventInjector (not deprecated) does not work without having this permission set.
3/ And could you tell me which are the args (with their format) I can set in CameraArguments(String args) in order to have a basic camera without zoom, with no setting available, with auto-flash, etc.
As very often, the API does not give any information . (moreover it is wrong pretty often also)
Thank you very much again for your help .
08-27-2010 03:12 PM
There are no methods to close a RIM application after it has been invoked. You can use event injection to inject the backspace key, as you are doing.
The default security settings disable event injection for an application. ApplicationPermissions.PERMISSION_EVENT_INJECTOR
was deprecated and replaced with ApplicationPermissions.PERMISSION_INPUT_SIMULATION in BlackBerry device software version 4.6.0.
The CameraArguments allow you to specify the picture camera or video camera. They do not allow you to change a user's settings.
Regarding the ControlledAccessException, have you granted your application the recording permission? You can check by going to Options, Advanced Options, Applications choosing your application and selecting Edit Permissions from the menu.
08-28-2010 07:30 AM
08-30-2010 03:20 AM