Play video works on the Simulator, but not on phone

Hello

I created a simple application that plays a video of Media Card. It works very well and play the video properly on simulators. But when I loaded the app on the phone (BB Bold), it shows just a white screen and no video.

The media file is in the following path on the map:

/ Media Card/BlackBerry/videos/I66.3GP

The path should be:

file:///SDCard/BlackBerry/videos/I66.3gp

OR

file:/// Card/BlackBerry/videos/I66.3GP Media

Any suggestions on how to get it to work on the phone?

class final VideoScreen extends form {}
Private player player;
private VideoControl vc;

{VideoScreen()}
try {}

Reader = Manager.createPlayer ("file:///SDCard/BlackBerry/videos/I66.3GP");
Player.Realize ();
VC = player.getControl ("VideoControl") (alarm);
vc.initDisplayMode (VideoControl.USE_DIRECT_VIDEO, this);
     
GUIControl gc;
If ((gc = player.getControl ("GUIControl")) (GUIControl)! = null)
Add ((Field) gc.initDisplayMode (GUIControl.USE_GUI_PRIMITIVE, null));
vc.setDisplayLocation (15, 15);
vc.setDisplaySize (400, 400);
vc.setVisible (true);
Player.Start ();
  
} catch (Exception e) {}
}
}

Problem solved! It turns out that the "IoException: cannot access the media file" is because the BB is hooked up to the computer via USB, apprently Media Card is not available when USB is plugged.

However, when USB is removed, I get this error:

java.lang.IllegalArgumentException: arg must not be null and must be a javax.microedition.lcdui.Canvas

It turns out that the audio/video tutorial of BB is incorrect, initDisplayMode cannot accept "GUIControl", he cannot accept that the canvas. In addition, if we directly on canvas without instantiate, it will be also caused an IllegalArgumentException.

Then, the following code works:

VideoControl vc;

Canvas canvas = new MyCanvas ();

If ((vc = player.getControl ("VideoControl")) (alarm)! = null) {}

vc.initDisplayMode (VideoControl.USE_DIRECT_VIDEO, canvas);

vc.setDisplayLocation (15, 15);

vc.setDisplaySize (400, 400);

vc.setVisible (true);

Player.Start ();

}

While (MyCanvas) is a dummy class that extends from javax.microedition.lcdui.Canvas

Import javax.microedition.lcdui.Canvas;

import net.rim.device.api.ui.Graphics;

 

MyCanvas class extends Canvas {}

public

 

public MyCanvas() {}

}

 

Protected Sub paint (javax.microedition.lcdui.Graphics arg0) {}

/ / TODO Auto-generated method stub

}

}

Tags: BlackBerry Developers

Similar Questions

  • GPS works on the Simulator, but not on phone

    Hello

    I created a simple application that gets the location of the device's GPS. The app works perfectly on the Simulator, but I have no GPS updates on the phone. I've been in options-> device-> Location.Settings on the phone and can see the GPS updates are coming through. But the app says there is no valid received GPS.

    I tried it on BlackBerry 9800... All I get on the phone is 'pending GPS update', that my app is displayed if no valid GPS don't trouble is received.

    Thanks in advance.

    Kevin

    C criteria = newCriteria();

    c.setHorizontalAccuracy (Criteria.NO_REQUIREMENT);

    c.setVerticalAccuracy (Criteria.NO_REQUIREMENT);

    c.setCostAllowed (true);

    c.setPreferredPowerConsumption (Criteria.POWER_USAGE_HIGH);

    LocationProvider lp;

    Try

    {

    LP = LocationProvider.getInstance (c);

    if (lp! = null)

    {

    lp.getLocation (timeout);

    lp.setLocationListener (newMyLocationListener(),-1, 1, 1);

    }

    on the other

    {

    Dialog.Alert ("sorry - your phone does not support GPS");

    }

    }

    catch (Exception e)

    {

    System.

    Err.println (try ());

    }

    }

    private class MyLocationListener implementsLocationListener

    {

    public voidlocationUpdated (LocationProvider provider, a place)

    {

    if (location! = null& location.isValid ())

    {

    QualifiedCoordinates qc = location.getQualifiedCoordinates ();

    Try

    {

    Lat string = Double.toString (qc.getLatitude ());

    String long = Double.toString (qc.getLongitude ());

    UpdateScreen ('place of registration successfully');

    }

    on the other

    {

    UpdateScreen (' Failed to day location ');

    }

    }

    catch (Exception e)

    {

    }

    }

    on the other

    {

    UpdateScreen ("waiting for GPS update");

    }

    }

    public void providerStateChanged (LocationProvider provider, intnewState)

    {

    TODO: If the provider has been disabled, then disable the reporting

    }

    }

    Try the examples of programs that you can find here:

    http://supportforums.BlackBerry.com/T5/Java-development/BBM-shareContent/m-p/1796237#M203486

    or here:

    http://supportforums.BlackBerry.com/T5/Java-development/simple-location-API/Ta-p/1145951

    See if these work on the unit.  If they do, look at the code listed and compare with yours.

  • Event Swipe works in the Simulator, but not on the device

    I'm using panels on my 9900 and I have 4 panels that the user will slide back and forth similar functioning BB app world, changing the summary of comments on signs etc..

    My expection who was up and down for scanning of touch screen functions and the touchpad has the same function by default, that is to the left and right slide on the screen should also be identical to forehand and left on the block to tack. But it does nothing for the panels when you use the trackpad.

    So I replace NavigationMovement and and can see the touchscreen and the track pad to generate a NavigationMovement event with +/-x according to the direction slide. So I'm first puzzled why hit swiping the trackpad on the left and right triggers not the same behavior by hitting swiping left and right on the touch screen.

    Accept that as a limitation of the API, I added my own features to NavigationMovement to inject a key event when user left or right on the trackpad moves. As follows:

    EventInjector.TouchEvent [] moveEvents = new EventInjector.TouchEvent [7];

    moveEvents [0] = new EventInjector.TouchEvent (TouchEvent.MOVE, 420, -1, -1, 60-1);
    moveEvents [1] = new EventInjector.TouchEvent (TouchEvent.MOVE, 360, 60,-1, -1, -1);
    moveEvents [2] = new EventInjector.TouchEvent (TouchEvent.MOVE, 300, 60,-1, -1, -1);
    moveEvents [3] = new EventInjector.TouchEvent (TouchEvent.MOVE, 240, 60,-1, -1, -1);
    moveEvents [4] = new EventInjector.TouchEvent (TouchEvent.MOVE, 180, 60,-1, -1, -1);
    moveEvents [5] = new EventInjector.TouchEvent (TouchEvent.MOVE, 120, 60,-1, -1, -1);
    moveEvents [6] = new EventInjector.TouchEvent (TouchEvent.MOVE, 60, 60,-1, -1, -1);
    EventInjector.TouchEvent.injectSwipeGesture (480, 60, moveEvents);

    It works perfectly in the Simulator, but on the device, there is no movement at all. So I thought that maybe the touchpad on the Simulator is more sensitive than on the real device, so I added a menu item to perform the injection above. Again, this works perfectly on the Simulator, but nothing on the device.

    Has anyone tried this brain left and just before the injection?  Up and down the injection works perfectly on the device.

    Have you enabled event injection in request permission settings for your application?  It is disabled by default.  You can do so by going to Options-> Application, select your application and click on change permissions.  You can also request these permissions programmatically using the class ApplicationPermission.

  • App works on the Simulator, but not on the device

    Just try to run the helloworlddemo app compiles fine and works on the Simulator without problem. All I get on the device is an icon of the application that does nothing when clicked.

    I had read this might have to do with the version of the JDE is high for the operating system on the device, but I'm running JDE 6.0.0.37 and the operating system on the device is 6.0.0.666

    I tried with my own app first, compiled, signed it and get the same result as helloworld, then its certainly some mounted sort of question but I have no idea of what

    Thank you

    Sheldon

    Thought of it - was to set the permission of application so that all 3 items were "allow."

  • My App works on the Simulator, but not on a handheld

    Using the JDE 4.5 with 4.1.2 MDS Simulator

    Eclipse with JDE

    ---

    My app works fine on the simulator using MDS.

    The application simply pushes a screen and then creates a thread (an object of type LoadScreenThread) that will take an XML file using HTTP.  The XML file is parsed and then creates a new screen and it grows by calling (from LoadScreenThread): invokeLater with an executable object what method run() calls anti-pop and the specified UiApplication pushScreen.

    I tried various things for the last 10 hours and it still does not work.

    For the HTTP connection, because I would use MDS to Internet I added the '; '. deviceside = false' suffix.

    Could someone tell me please know why it would work fine on the Simulator (MDS) and not on a portable device?

    On the handheld, I see the arrows download flicker.  But it drives not only the new screen?

    Your device is connected to a MDS (BlackBerry Enterprise Server)?

    If it's just your BB private, so it's rather unlikely, and you will very probably connected to BIS. But you have to grant special permissions to RIM using BIS to use other means like the WAP2 gateway.

    Take a look at this thread:

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=29103

    It explains basically everything on the sides of the network connectivity to BlackBerry.

  • my world event working on the Simulator, but not on the device

    Hi guys,.

    I'm using BB bold 9000. I have attached directly to the device and debugging. I'm getting "background switch detected for myapp (261) that does NOT have the tunnels open - defocus is NOT called" on the device debugging. but it works fine on the Simulator (my ultimate task is slaughtering an application from another application) any idea?

    Thank you

    Thank you guys, it's worked.

  • Firefox does not open, but is rather the error message "Unable to read the configuration file." He has worked in the past, but not now.

    Firefox does not open, but is rather the error message "Unable to read the configuration file." He has worked in the past, but not now.

    I REINSTALL 10 TIMES SO DON'T TELL ME THAT!
    I'm piss because I need firefox work again, so I can finish my reseaching in 5 days.


  • Work of Auditors in the Simulator but not actually "BOLD"

    Hey - if anyone knows how to get a "BOLD" handset to allow listeners (PhoneListener, KeyListener, OutboundMessageListener) I would appreciate it. My app uses listeners and works very well in the Simulator, but only sporadically on the actual handset. Does anyone know how it works?

    See you soon,.

    Justin Dutoit

    I think you need to post a snippet of a listener of non-working, if you want to help more with this.

  • Can deploy app in the Simulator, but not to the device

    Sorry about this newbie question, but how is it that a simple HelloWorld application compiled in Eclipse runs just fine on the Simulator, but cannot be installed on a 8320 Curve by the Blackberry Desktop Software?

    I use the latest version at all.  The message returned by the desktop software is:

    ! There was an error importing files.
    No additional applications can be found. Your file can
    contain applications that already exist in the list of applications,
    are not compatible for your device, or errors.

    However, I am able to deploy the application on the handset using the command line tool:

    C:\Eclipse\plugins\net.rim.ejde\vmTools\JavaLoader.exe -usb load \workspace\HelloTest\deliverables\Standard\5.0.0\HelloTest.jad
    

    This installs the application, which then runs correctly on the device.  I can then reload the list of app on the Blackberry Desktop Software tool and it shows HelloTest, but under the properties of the Application-> dependencies it says:

    "Application not available (net_rim_cldc).

    It seems that some dependence crept in the generation of the application and that confuses the desktop tool.  The curve is running 4.5 OS.

    Should I just throw this office tool, or how can I clean the application so that it installs correctly?  Obviously, this is just foreplay before building a much broader application, and I wish I had these little glitches will hamper ASASP.

    Thanks for any help!

    You should be able to download a plugin 4.5 on the site to update. Go to "help > install new software" to open the screen of software available. If you have not yet done so, add the updated BlackBerry site to your Eclipse configuration:

    1. Click on "available software Sites.
    2. Click on the button 'Add '.
    3. Enter a name such as 'BlackBerry update location' and set the location http://www.blackberry.com/go/eclipseUpdate/3.5/java
    4. Click OK, then OK again to return to the screen of the software available

    The 'working with' menu drop-down, select the location of BlackBerry Update (or whatever you named it). Expand the BlackBerry Java plug-in category and you should be able to select an appropriate plug-in version.

  • image in SVG shows it on the Simulator, but not on the device

    Hi all

    I put theelement in an SVG file with an image that I pick up store or the SD card. I can see the image set on the Simulator, but am not able to see it on the device.

    Here is the code snippet I definition of the element in the image:

    SVGElement "newelement" = (SVGElement) _document.createElementNS (SVG_NAMESPACE_URI, "image");
    newElement.setTraitNS (XLINK_NAMESPACE_URI, "href", dittos);
    newElement.setFloatTrait ("x", 0);
    newElement.setFloatTrait ("y", 0);
    newElement.setFloatTrait ("width", Display.getWidth ());
    newElement.setFloatTrait ("height", Display.getHeight ());
    _svg. AppendChild (newelement);
    Invalidate();

    Thanks in advance.

    ~ Shri

    It was with the size of the Image. Too big a picture and the device wont set it to SVG canvas.

    If the scale down the image and set the image if you want to set asin SVG.

  • Train with webutil works with the browser, but not with webstart JNLP 12 c

    Hello

    I set up forms and reports suite 12 c according to the instructions and I'm testing my forms updated since version 10 g.

    In some forms, I use webutil.

    I can run forms without webutil with the browser or java web start (everything works fine).

    I have problems with the forms use webutil tha, they work very well with the browser, but not with java web start.

    When I run forms with webutil and webstart I see all white and the "crash" application: I must leave because other forms without webutil also do not work.

    Here is my config in formsweb.cfg:

    [Appws] <-start java web

    form = nomeform

    Archive = frmall.jar, frmicons.jar

    WebUtilArchive = jacob.jar, frmwebutil.jar

    WebUtilTrustInternal = true

    WebUtilLogging = off

    WebUtilLoggingDetail = normal

    WebUtilErrorMode = alert

    WebUtilDispatchMonitorInterval = 5

    WebUtilTrustInternal = true

    WebUtilMaxTransferSize = 16384

    baseHTML = webutilbase.htm

    baseHTMLjpi = webutiljpi.htm

    basejnlp = webutil.jnlp

    WebStart = on

    [appnows] <-no java web start

    shape = mercurio

    separateFrame = true

    Archive = frmall.jar, frmicons.jar

    WebUtilArchive = jacob.jar, frmwebutil.jar

    WebUtilTrustInternal = true

    WebUtilLogging = off

    WebUtilLoggingDetail = normal

    WebUtilErrorMode = alert

    WebUtilDispatchMonitorInterval = 5

    WebUtilTrustInternal = true

    WebUtilMaxTransferSize = 16384

    baseHTML = webutilbase.htm

    baseHTMLjpi = webutiljpi.htm

    basejnlp = webutil.jnlp

    What could be the problem?

    Gianpaolo

    Remove Appws:

    Archive = frmall.jar, frmicons.jar

    WebUtilArchive = jacob.jar, frmwebutil.jar

    baseHTML = webutilbase.htm

    baseHTMLjpi = webutiljpi.htm

    Add frmicons.jar and jacob.jar to $ORACLE_HOME/forms/java/extensions.jnlp.

    and try again.

    Concerning

  • Why disable Flash Player addon allow videos work on one site but not another?

    I am running Firefox 37.02, Windows 7. I also have flash shockwave V17.0.0.134 & V18.0.0.95 addons. The V18 version is beta and downloaded from Adobe to try to resolve this ongoing problem. He has not solved it. By trial and error, I have established that when I disable the addons above mentioned (notice, disabling seems to disable the other) I am able to get videos from Web site to play (for example: video on golfchannel.com) but not another (example: www.nbcphiladelphia.com). Conversely, if the addons are enabled, the videos on the site www.nbcphiladelphia.com work but those of the golfchannel.com are not. By 'not' I mean that commercial video games earlier but the video of the main object that is to run thereafter is not. I get a black screen and the commercial video recycled again and again. I contacted the golfchannel.com support group who said that they were not aware of all the problems. They suggested that I use the Chrome browser, which is what they use without problem.

    It's weird. You can try using the Firefox Add-on FlashBlock to disable flash on some websites but not others: https://addons.mozilla.org/En-us/firefox/addon/flashblock/

  • New videos appears in the Photos, but not in iMovie

    Already when I imported video clips in iPhotos, the clips were made automatically available in iMovie so. Now, when I import video clips in Photos, it is made available in Photos but not in iMovie. Old clips still appear in iMovie, but not the new clips. It is not possible to import new clips with iMovie import function as iMovie cannot locate the file. Photo library only appears as a file in the Finder, and it cannot be opened with any program other than pictures.

    How can I get the clips in iMovie?

    OS X El Capitan 10.11.1 (B 15, 42)

    Version 1.2 (340.4.0) of the Photos

    iMovie 10.0.9

    Hi a random string,.

    The workflow I've always used is to create a folder for the videos and photos that I use in my video project and export (or drag) according to Photos or Aperture or iPhoto library in the folder.  Then use the Finder application to import the files into iMovie.

    The following resources explain why you can't see the Photos in the media browser:

    If the media browser shows all your photo library
    https://support.Apple.com/en-us/HT204669

    Sometimes the media browser, which allows applications like iMovie or Pages use images, pictures, shows all the available photos to your photo library.

    This happens when you use iCloud photo library with the preference to optimize Mac storage enabled.

    The media browser shows pictures that have the original image or a full preview size stored on your Mac. You can make a photo available temporarily for the media browser by double-clicking on it. This will download the original to your Mac, where it will be available in the media browser so that Photos optimizes still to save disk space.

    If you want to take pictures in permanently available Photos in the media browser, follow these steps:

    1. Select file > New Album... from the menu bar of Photos. Name the new album.
    2. Click on the photos you want to make available in the media browser.
    3. Click the Add button.
    4. Click on the Albums tab at the top of Photos and find the new album you created.
    5. CTRL-click (or right-click) the album, then select Download this Mac originals.

    This will download the full resolution of the images you have selected for your Mac, which makes them available at all times in the media browser.

    Note: You can do all the photos in your photo library available at all times for the media browser allowing to download the originals of the Mac in the preferences of Photos, but you will lose the benefits of clutter in preference to optimize Mac storage.

    Last modified: June 1, 2015

    Take a look at this section of the iMovie User Guide:

    Import on your Mac media
    http://help.Apple.com/iMovie/Mac/10.0/#mov6fa10197d

    Sometimes the media browser, which allows applications like iMovie or Pages use images, pictures, shows all the available photos to your photo library.

    This happens when you use iCloud photo library with the preference to optimize Mac storage enabled.

    The media browser shows pictures that have the original image or a full preview size stored on your Mac. You can make a photo available temporarily for the media browser by double-clicking on it. This will download the original to your Mac, where it will be available in the media browser so that Photos optimizes still to save disk space.

    If you want to take pictures in permanently available Photos in the media browser, follow these steps:

    1. Select file > New Album... from the menu bar of Photos. Name the new album.
    2. Click on the photos you want to make available in the media browser.
    3. Click the Add button.
    4. Click on the Albums tab at the top of Photos and find the new album you created.
    5. CTRL-click (or right-click) the album, then select Download this Mac originals.

    This will download the full resolution of the images you have selected for your Mac, which makes them available at all times in the media browser.

    Note: You can do all the photos in your photo library available at all times for the media browser allowing to download the originals of the Mac in the preferences of Photos, but you will lose the benefits of clutter in preference to optimize Mac storage.

    Last modified: June 1, 2015

    Import media by dragging it from the Finder

    • Select a file, command-click to select several files, or select a folder of files and do drag the selection from the Finder to the event in the list of libraries in iMovie.

    The clips appear in the event.

    Import using the import window media

    1. If the media you want to import is on an external hard drive, connect it to your Mac and turn it on.

    2. Click Import on the toolbar.

    3. In the devices section of the sidebar of the import window, select the drive or device you want to import media.

      The contents of the drive or device is displayed in a list at the bottom of the import window. You can individually select the clipsin the list view, and a preview of the selected item appears at the top of the import window.

      You can perform the following actions:

      • To sort videos in the view of list data such as time, creation date, size and so on: click on the column at the top of the display of the list headers.

      • To add a folder of press frequently used in the Favorites folder: drag a folder from the list on the right of the 'Favorites' header in the sidebar.

      • To remove a folder from the favorite section: Ctrl-click on the folder and select Remove from the context menu in the sidebar.

    4. To quickly navigate between the clips, fast forward or rewind, move the pointer over the preview at the top of the import window, and do one of the following:

      • To play or pause the selected clip: click on the Play button (or press the space bar).

      • To access the next or previous item: click the next or previous button.

        Note: If you are at or near the end of the selected item, you can click the back button to return at the beginning of the clip.

      • For fast forward: move the pointer over the following button and hold down the mouse or trackpad button.

      • To move backward: move the pointer on the back button and hold down the mouse or trackpad button.

    5. Do one of the following:

    • Choose an existing event to import clips in: select the event in the context menu "import to" at the top of the import window.

    • To create a new event to import clips in: choose new event from the context menu "import to", type a name for the new event and click OK.

    To learn more about the events, see organize the library.

  • Do one of the following:

    • To import all plans: click all import.

    • To import only some of the clips: command-click on each clip that you want to import, then click Import selected (the button import changes its name).

    Close the import window, and your clips appear in the event. According to the length of each element and the number of clips that you import, you can see a progress indicator in the upper right of the window, while the clips are imported.

    You can continue working in iMovie, then import finishes.

  • Happy holidays!

  • database simple html5 works in the browser but not emulator

    I have a database of simple html5. It works on browser (chrome/safari) but not in the emulator. If after having included the html5_init.js file does not work on an os device five? I also simulated a sd card, so this isn't a problem, why it does not work. Here is the code:

    html PAG

    !DOCTYPE html PUBLIC-//W3C//DTD HTML 4.01 Transitional//Ehttp://www.w3.org/TR/html4/loose.dthtmheameta nameviewpor idMeta contentinitial-scale=1.0,user-scalable=n meta namex-blackberry-defaultHoverEffec contentfals link  relstyleshee typetext/cs hrefcss/common.cslink  link  relstyleshee typetext/cs hrefcss/start.cslink link  relstyleshee typetext/cs hrefcss/tabs.cslink
    titlAdd Birthda/titlscript typetext/javascrip srcjs/common.j/scripscript typetext/javascrip srcjs/html5_init.j idhtml5_ini/scripscript typetext/javascrip srcjs/birthdayapp.j/scrip
    /heabody onLoadinit()
           div classmy_heade
               p aligncenteAdd Birthda/
           /di
    
               div classmain-pane
                   div classpanel-top-lef/di
                   div classpanel-top-righ/di
                   div classpanel-insid
                    div classpanel-noga
                       div classro
                           div classlaeFirst Name/di
                           input typetex idfirstnam
                       /di
                       div classlistSeparato/di
                       div classro
                           div classlabeLast Name/di
                           input typetex idlastnam
                       /di
                       div classlistSeparato/di
                       div classro
                           div classlabeEmail/di
                           input typetex idemai
                       /di
    
                        div classlistSeparato/di
                       div classro
                           div classlabePhone Number/di
                           input typetex idphonenumbe
                       /di
                       div classlistSeparato/di
                        div classro
                           div classlabeImage/di
                           input typetex idimag
                       /di
                       div classlistSeparato/di
                        div classro
                           div classlabeBirthday/di
                           input typetex idbirthda
                       /di
                        div classlistSeparato/di
                        div classro
                           div classlabeBaught Gift/di
                           input typetex idbaughtgif
                       /di
                           div classlistSeparato/di
                        div classro
                           div classlabeReminder Day/di
                           input typetex idreminderda
                       /di
    
                    /di
                   /di
                   div classpanel-bottom-lef/di
                   div classpanel-bottom-righ/di
               /di
               input typebutto stylefloat: right; padding: 6px; margin-right: 8px idsav valueSav onClickmakeReminder()
    
            ul idreminder 
    
           /u 
    
            /bod/htm
    

    Now for the javascript database thread

    //Pre-requisites
    var birthdayapp = {};
    
    //Step 1. Opening the database
    birthdayapp.db = null;
    
    birthdayapp.open = function() {
      var dbSize = 5 * 1024 * 1024; // 5MB
      birthdayapp.db = openDatabase('bdreminder', '1.0', 'Birthday Reminder', dbSize);
    }
    
    birthdayapp.onError = function(tx, e) {
      alert('Something unexpected happened: ' + e.message );
    }
    
    birthdayapp.onSuccess = function(tx, r) {
      // re-render all the data
      // loadReminders is defined in Step 4a
      birthdayapp.getAllReminders(loadReminders);
      alert("an action was performed successfully!");
    }
    
    //Step 2. Creating the table
    birthdayapp.createTable = function() {
      birthdayapp.db.transaction(function(tx) {
        tx.executeSql('CREATE TABLE IF NOT EXISTS bdreminders(reminder_id INTEGER PRIMARY KEY ASC,'+
                                                            'firstname   varchar(50), '+
                                                            'lastname    varchar(50), '+
                                                            'email       varchar(50), '+
                                                            'phonenumber varchar(50), '+
                                                            'image       varchar(50), '+
                                                            'birthday    varchar(30), '+
                                                            'baughtgift  char(3),     '+
                                                            'reminderday varchar(50),'+
                                                            'createdon   date)', []);
      });
    }
    
    //Step 3. Adding data to the table
    birthdayapp.addReminder = function(firstname,lastname,email,phonenumber,image,birthday,baughtgift,reminderday) {
      birthdayapp.db.transaction(function(tx){
        var createdon = new Date();
        tx.executeSql('INSERT INTO bdreminders(firstname, lastname, email, phonenumber, image, birthday, baughtgift, reminderday, createdon) '+
                      'VALUES (?,?,?,?,?,?,?,?,?)', [firstname, lastname, email, phonenumber, image, birthday, baughtgift, reminderday, createdon],
            birthdayapp.onSuccess,
            birthdayapp.onError);
        });
    }
    
    //Step 4. Selecting data from the table
    birthdayapp.getAllReminders = function(renderFunc) {
      birthdayapp.db.transaction(function(tx) {
        tx.executeSql('SELECT * FROM bdreminders', [], renderFunc,
            birthdayapp.onError);
      });
    }
    
    //Step 4a. Rendering data from the table
    function loadReminders(tx, rs) {
      var rowOutput = "";
      for (var i=0; i < rs.rows.length; i++) {
        rowOutput += renderReminders(rs.rows.item(i));
      }
    
      var reminders = document.getElementById('reminders');
      reminders.innerHTML = rowOutput;
    }
    
    function renderReminders(row) {
      return '
  • ' + row.reminder_id + '[X]
  • '; } //Step 5. Deleting data from the table birthdayapp.deleteReminder = function(id) { birthdayapp.db.transaction(function(tx) { tx.executeSql('DELETE FROM bdreminders WHERE reminder_id=?', [id], birthdayapp.onSuccess, birthdayapp.onError); }); } //Step 6. update the table birthdayapp.updateReminder = function(reminder_id,firstname,lastname,email,phonenumber,image,birthday,baughtgift,reminderday) { birthdayapp.db.transaction(function(tx) { tx.executeSql('UPDATE bdreminders set firstname = ?, lastname = ?, email = ?,phonenumber = ?,image = ?,birthday = ?, baughtgift = ?, reminderday = ? WHERE reminder_id = "reminder_id" ', [firstname, lastname, email, phonenumber, image, birthday, baughtgift, reminderday], birthdayapp.onSuccess, birthdayapp.onError); }); } //Step 7. select a specific from table birthdayapp.getOneReminder = function(reminder_id) { birthdayapp.db.transaction(function(tx) { tx.executeSql('SELECT * FROM bdreminders WHERE reminder_id = ? ', [reminder_id], birthdayapp.onSuccess, birthdayapp.onError); }); } //select specific record function makeReminder(){ alert("add reminder called"); var fn = document.getElementById('firstname').value; var ln = document.getElementById('lastname').value; var em = document.getElementById('email').value; var ph = document.getElementById('phonenumber').value; var im = document.getElementById('image').value; var bd = document.getElementById('birthday').value; var bg = document.getElementById('baughtgift').value; var rd = document.getElementById('reminderday').value; birthdayapp.addReminder(fn,ln,em,ph,im,bd,bg,rd); } //init function function init() { birthdayapp.open(); birthdayapp.createTable(); birthdayapp.getAllReminders(loadReminders); }

  • The screen on the Simulator, but not on the device loads

    Hi all

    This issue is driving me crazy.

    The problem: I added a menu item in the email application. When the user clicks on the menu, I load a pop-up screen and get the entry user, then save it. This works quite well on my Simulator (8310 v4.5). But when I load in my camera (8310 v4.5), is not.

    I can't understand where is the problem. Your entries please.

    Note: I checked with the record menu item. I added a warning msg before loading of the screen. The alert is displayed, while the screen does not load. (The screen is a separate category in the same menuitem file, I have class instantiaite inside the application menuitem run() method).

    Sorry, I was in a hurry, so just wrote a very brief answer.  Unusual for me!

    Take a look at this:

    http://supportforums.BlackBerry.com/T5/Java-development/how-do-I-debug-on-a-live-device/Ta-p/446842

    There are other tips on the forum that you will probably find through research, should he not help.

Maybe you are looking for

  • rendered savings composited files

    Hi, I'm migrating from iMovie, FCP - x 10 soon and spent time getting used to iMovie, which I see is a kind of final cut PRO - X version lite, or "limited" as it used to be called.  iMovie follows Cinestream, a versatile program, deep NLE editing sty

  • After upgrade, I can't navigate. When I click the icon, I get redirected to a sterile help page, with no way out and no navigation State. Help?

    I can not navigate on at all. I installed 20 FF, and when I try to activate I get redirected to a support deadend page. Before the upgrade, I uninstalled the previous version, which worked very well.

  • Qosmio G15-AV501 has stopped working

    My Qosmio G15-Av501 has stopped working after only 14 months of service. I was informed by repairers Toshibas that the graphics card has failed and it will require a payment of 512 gbp to fix. Since I have 3 other notebooks of 16 inches that have bee

  • Satellite Pro L300 1AD is unable to install the Windows XP display driver

    I just installed XP on my Satellite pro because my internet modem doesn't work with Vista. I went to the main site of Toshiba to install display drivers, but they moved it, it keeps bringing the message "this driver is not for this computer please co

  • Stop LabVIEW

    I have 3 exe files, all built from LabVIEW VI. 2 of them run for a long time, but for one of the exe when it is called, he can simply run once, and then it can close. I call you to the command prompt, from a batch file: for example. begin path/progra