FileSystemJournalListener

Hello

I am trying to create an application that listens to changes in the system, so when an image change, I update the path of this photo in the application. I have to do in the public static void hand, because I created another point of entry...

If the code appears as follows:

"So, how can I add a listener in the static vacuum without creating a new Instance?

You can not.

A Thread cannot exist without running in an Application context.  And nor can the FileSystemJournalListener.  If your approach will not work.  You must create an Application (or UiApplication) in your startup otherwise, that copy the following code will not work.

If you perform one of the following:

(1) create a separate Application for your background processing, or

2) start to "foreground" (background) processing at startup and use it.

Option (1) can cause problems with inter application communication (because they are two different applications), but (2) becomes confused, especially because your application cannot use System.exit (0) to close all screens - this will remove the FileSystemJournalListener.

There is no right answer here, you can decide for yourself.  In view of how your Application seems to be structured, I have the impression (1) is the easiest option.

Tags: BlackBerry Developers

Similar Questions

  • BB Torch - Dialog.doModal (disabiling FileSystemJournalListener reminder)?

    In our application, we display a unique dialogue (for most of the instructions) before launch us the camera application. However, when the user types a picture on the BlackBerry Torch 9800, our class FileSystemJournalListener does not fileJournalChanged() at all, even if we record the reminder with our Application object. However, when the user closes the camera and re - open it via the same method (where the dialog box does not display once again), the callback works very well. That's what I have so far:

    //within my UI container's constructor that launches the camera
    
    myImageListener = new QRCapturedJournalListener(this); //Implements FileSystemJournalListener
    
    ...
    
    //within my fieldChanged method in my UI container when the user clicks on the field that launches the cameraif(permissionCheck()){  if(myPersistDataObj.showHelp()){ Dialog d = new Dialog(Dialog.D_OK ,STR.INSTRUCTION,Dialog.D_OK, Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION),FIELD_HCENTER | FIELD_VCENTER);d.setFont(Fonts.getFont(6));d.doModal()myPersistantDataObj.shownHelp(true);showExternalCamera();   }} else {//notify user permission was denied}
    
    ...
    
    private void startExternalCamera(){            myAppIns.addFileSystemJournalListener(imageListener);     Camera.getInstance().invoke(); // start camera. Wrapper function that invokes the camera app}...
    
    //Invoke function in Camerainvoke(){   Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA, new CameraArguments());}
    

    If the dialog box is a bit conflicted with my PopupScreen, that shows my user interface, saving my reminder, which not is defined before the opening of the camera?

    Looks like I was wrong completely.

    Even if he entered my FileSystemJournalListener class, it was indeed to call fileJournalChanged after all. Part of the problem was that for some reason, when OS 6.0.0 calls the camera, there is some cases where she would call fileJournalChanged and send JPEGs of no return paths (during initialization on the Simulator for the first time, he sent back/store/home/user/camera /), in which my reminder in my UN-registed PopupScreen my FileSystemJournalListener without validating that the incoming path contained a JPEG file.

    Now, he's going only to unregister the listener if we indeed have a way with a JPEG file and then process it. I'm just curious to know if this is expected behavior go ahead with OS 6.0.0 since this never happened with the previous OS versions? I just want to be sure that it makes sense to unregister it if I only want to deal with the last image captured by the user via the camera.

  • FileSystemJournalListener and incoming SMS do not work together

    I need the two lisnner in my incoming sms app and added file listner

    SMS module

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/How_To _...

    and the listner added file is

    Application appInstance = Application.getApplication ();
    screen filesystemJournalListener = new filesystemJournalListener();
    appInstance.addFileSystemJournalListener (screen);

    both work very well sapratly but if I put the two together only sms worked listner file you added, but not work

    Please help and sorry for the bad English

    You put the interface of the camera in a Thread, and not the SMS interface.

  • FileSystemJournalListener; am I crazy or what?

    Pretty well dug in the demo, I can't get this type of work. The order of events (I think?) is supposed to be:

    (1) manufacturer of the screen load.

    (2) class form has a private member of the FileExplorerDemoJournalListener class that implements FileSystemJournalListener.

    (3) FileExplorerDemoJournalListener class has a constructor that takes the screen as an argument and keeps her in a private variable.

    (4) screen class going in the background (or otherwise remains active), and if the FileExplorerDemoJournalListener class lives to watch the file system.

    Don't know what Miss me, but I should get of the journal entries of this, and I get nothing.

    Import net.rim.device.api.io.file.FileSystemJournal;
    Import net.rim.device.api.io.file.FileSystemJournalEntry;
    Import net.rim.device.api.io.file.FileSystemJournalListener;
    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.Dialog;

    /**
    * Listener to determine where the files have been added to the file system.
    */
    / * package * / final class FileExplorerDemoJournalListener implements FileSystemJournalListener
    {
    Private JTrackScreen _screen.
    private long _lastUSN; // = 0;
       
       
    /**
    * Constructor.
    *
    @param screen to update when events occur.
    */
    FileExplorerDemoJournalListener (form JTrackScreen)
    {
    _SCREEN = screen;
    }

    /**
    * Notified at the file system event occurs.
    */
    Public Sub fileJournalChanged()
    {
    long nextUSN = FileSystemJournal.getNextUSN ();
    String msg = null;
           
    for (long nextUSN - 1; lookUSN = lookUSN > = _lastUSN & msg == null;--lookUSN))
    {
    Entry FileSystemJournalEntry = FileSystemJournal.getEntry (lookUSN);
               
    It has not found an entry.
    If (input == null)
    {
    break;
    }

    Check if this entry has been added or deleted.
    Path String = entry.getPath ();
               
    If (path! = null)
    {
    switch (entry.getEvent ())
    {
    case FileSystemJournalEntry.FILE_ADDED:
    MSG = 'File was added.';
    break;
                           
    case FileSystemJournalEntry.FILE_DELETED:
    MSG = 'File has been deleted.';
    break;
    }
    }
    }
           
    _lastUSN must be updated before you call showMessage() because this method
    pushes a modal screen in the display stack, which blocks this thread.
    If the modal screen of the wire then treats a log event file on this
    name of the application, the for loop above may end up the same treatment
    event that we block on.  Update _lastUSN before blocking prevents
    the same log file processing twice event and therefore prevents
    the same dialog box appears twice.
    _lastUSN = nextUSN;
           
    If (msg! = null)
    {
    showMessage (msg);
    _SCREEN.updateList ();
    _SCREEN. WriteLog (msg);
    }
    }
       
       
    /**
    * Displays the message in a dialog box.
    *
    @param msg the message to display.
    */
    Private Sub showMessage (String msg)
    {
    synchronized (UiApplication.getApplication () .getAppEventLock ())
    {
    Dialog.Alert (MSG);
    }
    }
    }

    You call Application.addFileSystemJournalListener to register your FileSystemJournalListener?

  • Example of FileSystemJournalListener HELP

    Hi, I am new, I am developing a bb application, which must not know when a picture has been added to the system either taken by the camera is received through bbm surveys.

    I tried this code:

    http://docs.BlackBerry.com/en/developers/deliverables/11942/Detect_when_img_is_added_or_removed_file...

    but there is a variable msg, I don't know where it comes from. Can someone help me with this.

    I would like to see a better example of this.

    I removed this part (msg is nothing) and it works, but it seems to be calling the FILE. Case ADDED more than 1 time.

    Thanks for the help.

    The code in this doc looks like this one is removed the FileExplorerDemo, which is a sample that you should have with your tools.  Look at this code for more information and maybe the answer to your question.

    Come back us if this is not enough.

  • While using camera in my current screen close request

    Hello

    I'm creating an application to send the form camera Images and gallary,

    (1) if I press the camera button in my application I want to capture image and show that image to the current screen.

    currenltly 2) I use below functioin to do, but the first use of the user application is invited to give permission to use the camera after that if we allow so the current screen is closed. before that it is capturing the picture.

    (3) if the use the application even after leaving the second time there is no closure of the current screen and it works fine.

    All of the suggestions. can be given permissions such as the use of the camera before even install app in android permissions.

    The function that I used is

    public void uploadPhotoFromCamera (final int flagg) {}
    final FileSystemJournalListener listener = new FileSystemJournalListener()
    {
    long lastUSN;
    long a = lastUSN;
    Public Sub fileJournalChanged()
    {
    try {}
    Thread.Sleep (50);
    } catch (InterruptedException e) {}
    Generative TODO catch block
    e.printStackTrace ();
    }
    Long USN = FileSystemJournal.getNextUSN ();
    external: for (long I = USN - 1; i > = lastUSN;--i))
    {
    Entry FileSystemJournalEntry = FileSystemJournal.getEntry (i);
    If (input! = null)
    {
    If (entry.getEvent () is FileSystemJournalEntry.FILE_ADDED)
    {
    If (entry.getPath () .indexOf (".jpg")! = - 1).
    {
    lastUSN = USN;
    photoPath = entry.getPath ();
    Try
    {
    acceptance of Boolean = false;
    APM ApplicationPermissionsManager = ApplicationPermissionsManager.getInstance ();
    Original ApplicationPermissions = apm.getApplicationPermissions ();

    ApplicationPermissions permRequest = new ApplicationPermissions();
    If (original.getPermission (ApplicationPermissions.PERMISSION_INPUT_SIMULATION)! = ApplicationPermissions.VALUE_ALLOW)
    {
    permRequest.addPermission (ApplicationPermissions.PERMISSION_INPUT_SIMULATION);
    permRequest.addPermission (ApplicationPermissions.PERMISSION_AUTHENTICATOR_API);
    permRequest.addPermission (ApplicationPermissions.PERMISSION_EVENT_INJECTOR);
    acceptance = ApplicationPermissionsManager.getInstance () .invokePermissionsRequest (permRequest);
    }
    //
    Inject the EventInjector.KeyEvent = new EventInjector.KeyEvent (EventInjector.KeyEvent.KEY_DOWN, Characters.ESCAPE, 50);
    EventInjector.invokeEvent (inject);
    EventInjector.invokeEvent (inject);
    EventInjector.invokeEvent (inject);

    If (photoPath! = null) {}
    Here I use this image from this path
    }

    } catch (Exception e) {}
    RIMLogger.getInstance("TraceCRM").error ("# error photo Capture >" + e.getMessage () +")<>
    }

    break outer;
    }
    }
    }
    }
    lastUSN = USN;
    }
    };

    UiApplication.getUiApplication () .addFileSystemJournalListener (listener);
    Invoke.invokeApplication (Invoke.APP_TYPE_CAMERA, new CameraArguments (CameraArguments.ARG_CAMERA_APP));
    }

    Thank you

    Ask permission before you make in this--see

    ApplicationPermissionsDemo

  • Use the image in your application

    Hello

    I am building a blackberry application that can connect to the camera. How to save a captured image and use it in your application? For example, in blackberry messenger, you can capture images and set it as your display picture. I plan to do the kind of the same thing like that.

    Thanks a bunch before!

    dsutandi

    This is the code to call the camera and save the captured image

    private void takePhoto()
        {
            final FileSystemJournalListener listener = new FileSystemJournalListener()
            {
                long lastUSN;
                boolean hasAppPermission;
                public void fileJournalChanged()
                {
                    long USN = FileSystemJournal.getNextUSN();
                    outer: for (long i = USN - 1; i >= lastUSN; --i)
                    {
                        FileSystemJournalEntry entry = FileSystemJournal.getEntry(i);
                        if (entry != null)
                        {
                            if (entry.getEvent() == FileSystemJournalEntry.FILE_ADDED)
                            {
                                if (entry.getPath().indexOf(".jpg") != -1)
                                {
                                    lastUSN = USN;
                                    photoPath = entry.getPath();
                                    try
                                    {
                                        ApplicationPermissionsManager apm = ApplicationPermissionsManager.getInstance();
                                        ApplicationPermissions original = apm.getApplicationPermissions();
    
                                        ApplicationPermissions permRequest = new ApplicationPermissions();
                                        if(original.getPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION) != ApplicationPermissions.VALUE_ALLOW)
                                        {
                                            permRequest.addPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION);
                                            permRequest.addPermission(ApplicationPermissions.PERMISSION_DEVICE_SETTINGS);
                                            permRequest.addPermission(ApplicationPermissions.PERMISSION_EVENT_INJECTOR);
                                            boolean acceptance = ApplicationPermissionsManager.getInstance().invokePermissionsRequest(permRequest);
                                        }
    
                                            EventInjector.KeyEvent inject = new EventInjector.KeyEvent(EventInjector.KeyEvent.KEY_DOWN,Characters.ESCAPE,  50);
                                            EventInjector.invokeEvent(inject);
                                            EventInjector.invokeEvent(inject);
                                            EventInjector.invokeEvent(inject);
    
                                            if(photoPath != null)
                                                photoPath = "file://"+photoPath;
    
                                            if(photoPath != null && !photoPath.equals("file://"))
                                            {
                                                 UiApplication.getUiApplication().removeFileSystemJournalListener(this);
                                                Bitmap bmp  = ResizeImage.getBitmapImageFromFilePath(photoPath);
                                                /**
                                                                       here you will get the image path what you captured. By using this path you can get the image
                                                                       */
    
                                            }
    
                                     }catch (Exception e){
                                            System.out.println("Exception caught :" + e);
                                     }
    
                                    break outer;
                                }
                            }
                        }
                    }
                    lastUSN = USN;
                }
            };
            UiApplication.getUiApplication().addFileSystemJournalListener(listener);
            Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA, new CameraArguments());
        }
    
  • Removal of Documents after the Invocation is complete.

    Hi again!

    I need to show all kinds of Documents, since it would takes years to develop a full office suite, I thought it would be great to do just the same thing I do on Android and rely solely on existing applications to manage this problem. Unfortunately, I have to create the file on the SD card, because Connector.open("file:///Store/home/user/") always up a filesystem 1003 error, and I have my first choice which was invocation.setData (someContentToDisplay) and invocation.setType (someMimeType) will open DocsToGo, who will say in turn that the file is not found. "

    Now, all this isn't so bad, if I could just delete the file that has been written on the SD card immediately after that DocsToGo is closed or loses the focus, or better yet, after DocsToGo loaded the file in the memory RAM.

    My current implementation looks like this, the funny is that no exception is thrown, the deleted file is not:

    Doc DocumentEntity is DatabaseHandler.getInstance () .getDecisionDocument (docId);.
    Path String = "file:///SDCard/mobdec/";
    FileConnection fc = (FileConnection) Connector.open (path, Connector.READ_WRITE);
    If (! fc.exists ()) {}
    FC.mkdir ();
    }
    FC. Close();
    String filename = path + doc.getTitle ();
    FC = (FileConnection) Connector.open (filename, Connector.READ_WRITE);
    If (! fc.exists ()) {}
    FC. Create();
    }
    DataOutputStream back = fc.openDataOutputStream ();
    back. Write (doc.getContent ());
    back. Flush();
    back. Close();

    Create the call request.
    Invocation of the invocation = new Invocation (filename);
    invocation.setAction (ContentHandler.ACTION_OPEN);
    invocation.setResponseRequired (false);
    Use the registry to make the call.
    The Registry = Registry.getRegistry ("net.mobiledecision.client.blackberry.MobileDecisionScreen");
    Registry.Invoke (invocation);

    While (invocation.getStatus ()! = Invocation.OK & invocation.getStatus ()! = Invocation.ERROR & invocation.getStatus ()! = Invocation.CANCELLED) {}
    synchronized (THIS) {}
    Wait (50);
    }
    }

    FC. Delete();
    FC. Close();

    Thank you!

    It is not a concept of a 'House' in BBOS directory.

    Regarding your problem, you will not like the options that I will propose:

    (a) have a thread looking for active applications.  If DocsToGo is not active, you can delete the file

    (b) use a FileSystemJournalListener a DMoniteur activity against your file.  When it is closed, delete it.

    Sorry, I can't think of something better.

  • Cannot call ESC key two times of the key event

    Hello, this is my second post here...

    lately im trying to call the camera application via:

    UiApplication.getUiApplication () .addFileSystemJournalListener (new fileJournal());
    Invoke.invokeApplication (Invoke.APP_TYPE_CAMERA, new CameraArguments());

    and when the user to take a photo, then the application will grab the location of the file and close the camera application. but when I try to close the camera application using:

    Inject the EventInjector.KeyEvent = new EventInjector.KeyEvent (EventInjector.KeyEvent.KEY_DOWN, Characters.ESCAPE, 0);
    Inject.post ();

    Inject.post ();

    Simply call the inject.post () once and jump down (when I tried it on a simulator its works well but when I tried it on gemini 8520 is not working as the Simulator). I put the inject.post () at the end of my FileSystemJournalListener class.

    is there anyone who can help me please, thank you

    I had to use it to simulate the copy / paste before, it is what I did to get permission to use:

    ApplicationPermissionsManager apm = ApplicationPermissionsManager.getInstance();
    ApplicationPermissions ap = new ApplicationPermissions();
    
    if(apm.getPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION) == ApplicationPermissions.VALUE_DENY) {
         ap.addPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION);
        ReasonProvider rp = new ReasonProvider() {
            public String getMessage(int permissionID) {
                if(permissionID == ApplicationPermissions.PERMISSION_INPUT_SIMULATION) {
                    return "";
                }
    
                return null;
            }
        };
        try{
            apm.addReasonProvider(ApplicationDescriptor.currentApplicationDescriptor(), rp);
    
        }
        catch(IllegalArgumentException e) {
    
        }
    
        apm.invokePermissionsRequest(ap);
    }
    
  • How to keep track of a file?

    I want to follow the change of a file on the SD card. For example, when the "file:///SDCard/tempfile" file is modified, my program wants to receive a notification in this regard. How could I write the program? Or what API should I use?

    PS:

    1. If possible, I don't want to use a loop forever as «while (...)» {...}".

    2. the FileSystemListener interface can only monitor the status changed from roots. I want a similaer to interface with it, but can monitor common files.

    Please help me. Thank you!

    I wrote a class to set up FileSystemJournalListener Interface and added using addFileSystemJournalListener().

    Implementation of fileJournalChanged() can monitor the changes of one or more files specified using FileSystemJournal.getEntry (FileSystemJournal.getNextUSN () - 1).

    Thank you! This is what I want.

  • Change the example of the camera to activate Flash

    Is there a way to turn on the flash on the camera as an example?  I would like the flash or light from the video camera to be activated when the Application starts.  I read some posts that say it is not possible now, but those who were a year ago or more.

    Thank you

    Do you mean to incorporate the camera application in your application? If this is the case, then not to my knowledge. Then, you will need to do the way it is done in the example of the camera and build all the features you need in your user interface.

    However, you can launch the native camera for aid which is available for 4.2 +:

    Invoke.invokeApplication (Invoke.APP_TYPE_CAMERA, new CameraArguments());

    And if you are for example answering a picture taken so that you can ask the user to return to your application, you can use the FileSystemJournalListener to be notified of any changes (adding file to take a photo).

  • CameraDemo Bug in OS 6.0? Menu to delete the image

    I tried to integrate the camera into an application and effect of unusual screen in OS 6.0.

    I tested on 9780 and 9800 simulators and devices.

    When the field of viewfinder on the screen, everything is OK.  However, as soon as you press on the menu (for example to change the encoding), the s screen allowed.

    The attached images show that on a simulator of 9780.

    Has anyone seen something like this?  Any suggestions that workarounds?

    I will try to replace the menu with a PopupScreen and see if that helps.

    Fix.

    Use FileSystemJournalListener to detect that the photo was taken, get the path of the image.

    At this point, you have several options depending on whether you want to just take a single or multiple image.

    I seek only to a single capture so as soon as I get the picture, I force the camera app to close by injecting Escape keydown events.  This will also bring your application in the foreground.

    Generally, it takes about 1-2 seconds to take a picture of back in your application.   You get also all the advantages of the native camera application.

  • Status of bad jpeg JPGDEC 23

    I have an application that calls the camera uses a FileSystemJournalListener to retrieve the recently taken picture and adds a thumbnail of that picture on the screen of the application that triggered the invocation.

    This all works fine.

    However, on occasion (and I can't determine exactly when or how) debug display "JPGDEC jpeg bad state 23.

    I don't know what this means, but it causes the recovered image to show that almost half of the sticker after calling createBitmapFromBytes.

    It seems to happen only with certain images or images taken by the camera.

    Any suggestions for what it is?

    It turns out that the combined Thread to check if the image is taken was great solved the problem. The Bitmap.creatBitmapFromBytes () was throwing an OutOfMemoryException. The user has been taking photos in the Large (2048 x 1068) resolution. I solved the problem by checking the length of bytes defining a scale for the thumbnail. Thanks for the help.

  • Camera to call and wait for the photo?

    Hello world

    First post on these forums, but I've been lurking here for a while. I have a simple question that can have a simple answer, and I hope someone here can enlighten us on this issue.

    I'm looking to call the camera of my application, I can do it quite easily. In addition, I have a listener of filesystem implemented seeking a .jpg file saved after that the user takes a photo. Here are the relevant lines of code (more or less):

    Listener = new FileSystemJournalListener() {}

    public void fileJournalChanged() {}

    Long USN = FileSystemJournal.getNextUSN ();

    for (long I = USN - 1; i > = lastUSN; i--) {}

    Entry FileSystemJournalEntry = FileSystemJournal.getEntry (i);

    If (input! = null) {}

    If (entry.getEvent () == FileSystemJournalEntry.FILE_ADDED: entry.getEvent () == FileSystemJournalEntry.FILE_CHANGED: entry.getEvent () == FileSystemJournalEntry.FILE_RENAMED) {}

    If (entry.getPath () .indexOf (".jpg")! = - 1) {}

    lastUSN = USN;

    photoPath = entry.getPath ();

    }

    }

    }

    }

    lastUSN = USN;

    }

    }

    UiApplication.getUiApplication () .addFileSystemJournalListener (listener);

    Invoke.invokeApplication (Invoke.APP_TYPE_CAMERA, new CameraArguments());

    My problem is I want to access and extract the image from the camera in a way series application, then I would like my request for locking/blocking/wait until what the auditor has identified a new image file. I believe that this is possible, but I'm not familiar with how to do it. In my debugging experience, at least on the Simulator, invokeApplication is threaded (asynchronous) and my request is still ongoing in the background, even if the camera application is active and on the foreground. I tried to add a dummy while loop after the call to Invoke that checks whether my application is in the foreground (using isForeground) but has not lead me on the path.

    I'm working with JDE 4.6.1 and 4.7. Any help would be greatly appreciated!

    Best,

    Wire update

    Hi Peter,.

    Thanks again for your response. I'm really not in one of the videos/images . You can always check my github profile (www.github.com/filmaj), which also contains my range of PhoneGap - it contains the latest code of BlackBerry for our project. In addition, PhoneGap is completely open source and under license by virtue of the MIT, which is pretty liberal, so feel free to grab the code and play with it / use it at your leisure!

    Thanks for the info on the thread of events, which is very insightful. And Yes, almost all PhoneGap runs on the event Thread (except for the recovery of the resource - two resources the application external or local-unit, i.e. the pages html, css, js, images, etc.). It is indeed a difficult situation, but I think I have the solution, but it does not actually the code Java of BlackBerry. I think I can actually solve this problem as soon as the end of JavaScript.

    For context, here's a brief overview / example of how PhoneGap works on a BlackBerry:

    1. developer making an app with PhoneGap called something like navigator.camera.getPicture (success, failure) of JavaScript on the access to its Web site, with the 'success' and 'failure' based on the handles to reminders for image retrieval success or failure, respectively.

    2 some PhoneGap JavaScript wrapper code sets a cookie (document.cookie = "foobar"-call with a particular PhoneGap message format, in this case for the camera.)

    3. We then carry on native code of BlackBerry. Object BrowserField, that displays web application pages and executes the JavaScript Shell, then intercepts this cookie-setting event (via the eventOccured to the RenderingApplication method and Event.EVENT_SET_HTTP_COOKIE event type) and numbers which native device to recover/call feature.

    4. the specific device feature is called and returns a string from a combination of code JavaScript logic and JSON (code object for data transport representation). This string is stored in a Java vector, which is a member of class PhoneGap.

    5. at this point, the cookie-setting event method has finished running, execution returns to the wrapper of PhoneGap JavaScript function. Now, we get the contents of JS document.cookie. As done previously, using the same approach, catch us the event "getCookie" and fill it with the contents of the Java vector we populated earlier. It finally passed into the web page's JavaScript.

    6 back in the land of JavaScript, the last step is to eval() the contents of the cookie, fill data members and call reminders on the right.

    So my solution is to simply ask document.cookie (and therefore indirectly on the contents of the Java vector election) in a defined - for example, every second - interval instead of immediately after the launch of the functionality of the device and only once. In this way, the app will be keep polling the vector object to the new answers PhoneGap and evaluate constantly.

    In all cases, you can not directly solved my problem, but you led me in the right direction! Congratulations to you, Sir!

    Thanks again,

    Wire update

  • Application with cam on 8120 (4.5.0)

    Hi group. I developed an application that works normally in my 4.6.0 Simulator (9000JDE). When I push the button of my camera I opened a "screen of the device" which allows the user to take a picture. This image will be stored on the SD card with a predefined name device. The problem comes when I try to run my application on the 4.5.0. (JDE 8120 Simulator). The application works normally until I push my camera screen. And the problem in the same cams line according to survey an exception of media.

    A player = Manager.createPlayer ("capture://video");

    In any case, I did some research and I think I can't work like this. But maybe I could initialize the default camera app. The problem is that I Don t have control of stored thenames. Any suggestion?

    Thank you very much and sorry for my ignorance!

    The only way I know to get the picture from the camera on the old equipment is to

    Invoke.invokeApplication (Invoke.APP_TYPE_CAMERA, new CameraArguments());

    and use FileSystemJournalListener to retrieve the recently added files (first added and then changed) and use it.

Maybe you are looking for