Widget Gears httprequest

The new Widget SDK (Beta) supports the object httprequest API as part of its support to Gears?  I have the following code, which works very well through IE, but does not work when compiled as a Widget running on the Simulator.  It seems to be failing at request.open stage.

TIA

Dave

Go online

It looks like a question of demand original cross with the purpose of Gears in the beta version code.  The problem was reported to the development team and fixed.

For now, you can use the regular XHR way as long as you don't need to run in a worker thread.

Tags: BlackBerry Developers

Similar Questions

  • Loading an image out of a widget... Legend/display until this only charged text?

    I create an image using google static graphics and display it inside one of my widgets. Once the web request is made to the chart, I place the on the form, but I would like to be able to set the ALT text or something to show somehow a text until the image appears. Any ideas/thoughts?

    I did similar things in the widgets that might be of help in this situation.

    When your page loads all first use an image of "loading" to act as a space reserved where the graph is supposed to go.  Make sure that this placeholder image is generic and local for the widget so that it loads instantly.

    Then use AJAX to retrieve the table.  Specifically, I use the Gears HTTPRequest object because it has a responseBlob property.  Once you have retrieved into a blob content save your image graphic/blob with a unique name locally on the file system (be sure to white list this place).  Then replace the placeholder image "src" with the local path to the saved image.

    Now at this point you're probably thinking... Why the hell would I do that?

    The reason why I suggest this is because caching is not enabled in the widgets.  By doing this you are essentially caching the image to the next, and it will be much faster.  On the next view, if your data points in the chart are the same, just pull the image directly from the local file system to the place to recover again.

    It becomes like your own little hidden on the file system that you control.  We will also be providing built in caching in a near future of widgets that will help you in this scenario.  But it is also a good technique for all AJAX requests for data that are just snippets of XML/HTML.  Put in browser cache only put cache files and not blocks of data retrieved by XMLHttpRequest.  I found creating a small cache of the generic file system is quite simple and quite convenient.

    I hope that gives you some ideas

  • Widget that uses google gears on Blackberry 8530 will not work

    Hello world

    I have developed a widget that uses google gears and the file gears_init.js as the method to use sqlite. I am able to load and to see the widget to work on the 8530 Simulator, however it seems that the sqlite database is not created, and all I see are my html pages.

    Does anyone know what could be the problem? I have also deployed the app my physical device to the 8530, but are experiencing the same problem. I'm on OS 5.0.0459 and Google gears version 0.5.0.0.

    Any help is appreciated.

    Thank you.

    Hi drjg22,

    Make sure when you are finished with any game registration you explicitly close it.  If you do not explicitly close your record sets it will cause a memory leak.

    Do a quick check to see if your code is close your recordsets.  The signature of your error as this sounds could be the cause.

  • OS5 HTML5 gear - openDatabase fails - undefined database

    Hello..

    Today, I tried to create a simple widget with intervention from the database. I started with reading a few articles on the blackberry developer pages and found some interesting resources. Especially since the support gear was abandoned with OS6.  Widgets my future must run on OS5 OS6 devices, so I followed the instructions to support the gears using HTML5 in the BlackBerry Widget applications.

    After reading a few things about this Api WebSQL, I tried to create a little Gizmo, which stores a simple text input in the database. I tried the WebSQL Code in my browser (Opera) normal and it worked, but not when I test it in the BlackBerry Simulator.

    I created my widget as described in the tutorial "how to avoid recompiling a BlackBerry Widget during development.

    In my widget, the "openDatabase" call fails, even if this function exists. I tried to get the error with a try-catch block information, but the call fails "silently". After investigating this feature (display its content in a textarea component) I found creating a database object in a try-catch block.

    When I try to create these objects in database for me, it throws the following exception: ReferenceError: "Database" is not defined.

    You have any ideas?

    I use the widget in a Curve 8520 Simulator, OS Version 5.0.0.50 9, Version 2.13.0.97 Simulator.

    If you would like more information, please ask!

    Thank you for your help and I hope that my English is not too bad. (It is not my native language)

    Here is my html and javascript code:

    
    
    
        Test
        
        
        
        
        
        
    
    
    
    

    You simulate a SD card inserted in the Simulator?  A SQLite database on 5.0 must either be stored on a card inserted SD or built in the MEM card.  Built in card MEM is only on storm devices and 9000 "BOLD".

    If you simulate a SD card on your curve Simulator, the database must be created

  • Output of widget with red button.

    Hello

    This blackberry.app.event.onExit (handleExit) function does not work when we exit the widget with the red button.

    Is there another function to intercept this event?

    If I use the red button to leave my application when I reopen it the application, I got a "file system (12) error" error when I do that:

    Private = google.gears.factory.create('beta.database');
    _db. Open ('notesBase');

    Any idea?

    Thanks in advance

    The (red) end call button will not end an app.  He moves to the background.

    If you want your 'handleExit' method that is called when the user clicks on this button, register you the handler in your application:

    blackberry.system.event.onHardwareKey(blackberry.system.event.KEY_ENDCALL, handleExit);
    
  • Widget displays daily - best solution?

    Hello

    I made a widget that shows 40 new each morning.

    For the moment, I push the news every morning, as a string of 40.

    When my widget news, it stores it in a database of google gears.

    On my index.html page, I have a table. Each line is a new.

    My problem is that it is very long to load.

    ------------------------------------------------------part of my load method ------------------------------------------

    If (rs.isValidRow ()) {}
    Add entries to the table

    While (rs.isValidRow ()) {}
                                       
    "linkTable.innerHTML +="."+ rs.field (1) +""+ rs.field (2) +""+ rs.field (3) +"";
                      
    RS. Next();
    }
    RS. Close();
    }
    Data.Close ();

    ------------------------------------------------------------------------------------------------------------------

    If I go to another page and back to the index.html page, I still have to wait for loading...

    What is the best solution for this kind of request?

    Thank you very much

    The manipulation of the DOM is extremely costly on a mobile browser. Whenever you update the DOM it will recalculate a layout and re - calculate the information on the page.

    In your code example, you would be able to accelerate a lot just using a variable to concatenate all your DOM elements in the first loop and then just call "linkTable.innerHTML" once to then update your page.

    Your code is now updates the DOM 40 times and whenever it updates, it must recalculate the page layout. Each update of the 40 will be progressively slower because the DOM increases in size.

  • Widget Sqlite using a packaged .sqlite file?

    If I have a sqlite database must be installed with my widget on the package, how to access these data in the widget? I read that the documentation of gears and 'fix' and 'Detach' commands are the two people with reduced mobility?

    You will not be able to distribute a database SQLite pre-packaged with your application.  All data transmissions are encrypted on the device and cannot be replaced.

    You will need to build your database through JavaScript.  For your data by default, you can incorporate XML files in your widget and then loop through them to feed your database in a worker thread.

  • Wow. Display encrypted Gears db

    I just read a post that a little amazed all hope of debugging easily using the Sqlite database. http://208.74.204.192/T5/Web-development/widget-SQLite-using-a-packaged-SQLite-file/m-p/380088/highl...

    When I try to open a Sqlite database created in the Simulator (using the Sqlite database browser or browser Sqlite Expert), I get the message: "file is encrypted or not a database.

    I take this means that using any tool is impossible on the basis of the gears, since they are encrypted?

    Yep, to clarify, non encrypted db should be used for debugging purposes.  When your application is ready for production, allow the application to create the correctly encrypted db.

    EI

  • Future gear

    In light of Google's announcement that they are no longer developing Gears and gradually in favor of HTML 5, how does this affect the Widget SDK?

    That HTML 5 standards evolve, RIM will also consider to provide support in the rendering engine of the browser that is shared by the native browser for BlackBerry and BlackBerry Widget SDK.

    At this point, there are no current plans to end support for the gears in BlackBerry Widgets or the browser.

  • Since a widget network connection status

    Hello

    I am the design using a widget that uses google gears api for sqlite db.

    Is there any method of api standard blackberry that will detect the wherther the device is online or offline?

    Imagine that I have to update information in the db of the server via an http connection - is it possible to standart to detect if it is possible?

    Thank you

    blackberry.system.hasDataCoverage)

    check the widget API available here... http://www.BlackBerry.com/developers/docs/widgetapi/

  • Widget best quality on the landing... video YouTube?

    Hi all: I can't get the youtube widget to load my video in better quality on the landing? When I preview the page in a browser it's horrible, but then I get to the bottom of the gear icon and choose a higher resolution and everything looks great. Vimeo widget lands with a higher resolution. Yes, I know the obvious answer is just to load to vimeo... but it's nonprofit project and I am doing with it! Any help would be appreciated. Thank you.

    Hello

    You can do this by manually editing and recording the code youtube integrated into Muse.

    Please see the link below which explains the required edition.

    http://StackOverflow.com/questions/7582336/force-YouTube-embed-to-start-in-720p

    Once you are ready with the code, enter it in muse of object > insert HTML code

    Kind regards

    Vivek

  • Where to find the browser widget in DW CC2015?

    Hello, I can't find the widget browser or extensions in DW CC 2015 Mac. Where is - this function. In older versions, it was a symbol of the gear.

    The Widget browser and the extensions manager died, see the Adobe ExchangeEM.

    If you want EM, see here for Adobe Creative Cloud PVII extensions Manager or here http://www.dmxzone.com/go/22670/dmxzone-extension-manager-for-dreamweaver/

  • the iOS 10 not displaying calendar widget is not the events

    After the update to iOS 10.0.2, the calendar available on the lock screen widget does not always display the events. Nor the duration of the event or the event name appears, but a white widget with calendar color bar can be seen.

    This is not always the case, but very often. For ex, if you open the calendar application, then check this widget, event, but after that you lock the screen and check again, it would disappear.

    Hello jyothishureth,

    Thank you for using communities of Apple Support. It is my understanding from your iPhone Calendar widget still shows no events. I use my daily calendar to keep me organized. I can understand your concern. I'm happy to help you.

    If you haven't done so already, I recommend that you restart the phone. This can solve many unexpected behaviours. Follow the steps below:

    1. Press and hold the sleep/wake button until the Red slider appears.
    2. Drag the slider to turn off your device completely off.
    3. Once the device turns off, press and hold the sleep/wake button again until you see the Apple logo

    Restart your iPhone, iPad or iPod touch

    If the problem persists, try to remove the widget and adding it back on. Use the following steps:

    1. Right above the home, lock screen or Notification Centerscreen.
    2. Scroll down and tap on change.
    3. To add a Widget, press on . To remove a Widget, press on . To reorder your Widgets, touch and hold next to the apps and drag the in the desired order.
    4. Finally, tap done.

    Use Widgets on your iPhone, iPad and iPod touch

    Have a great day!

  • How can I get rid of the widgets screen?

    Since the upgrade to iOS 10, a widget screen when I start my phone.  How can I get rid of this sort my identification of access/contact code screen appears when I turn on the phone?

    Thank you.

    With iOS 10, if you see the widget screen by sliding the lock screen is normal and how the new iOS.  It is more action 'slide to unlock' available in iOS 10.

    To operate the unit and go directly to the password entry screen (if you are using a fingerprint recognition), press the home button twice.

    In iOS 10 from the lock screen, are the only gestures by scanning

    1. slide from right to left to bring up the camera

    2. slide left to right to bring up the widgets screen (from the widget screen, swipe down to search for).

  • News Widget - How can I make sites for news?

    With iOS 10, I activated the Widget 'News' see what kind of new Danish suggest from my iPhone, I read.

    I can control what web sites he scratches for the stories?

    Is the suggested reports based on my historical Safari of navigation or bookmarks?

    Hey Henrik Dalgaard,.

    Thank you for using communities of Apple Support. I can see from your post that you have questions about the use of the application of new and the widget on your iPhone 6s. I would be happy to provide information that you can get started, and you can change to display the news that matters most to you. Below is a link with details on how to use the new app on your device.

    Use the news on your iPhone, iPad or iPod touch

    Hope that answers your question.

    See you soon.

Maybe you are looking for

  • How to convert a word document that has been e mailed me pages so that I can change it?

    I've been electronic document sent by post a Word. How can I change it to Pages?

  • Cannot download the AMD for Satellite C870-C7W display driver

    Hello my name is?. I have some problems with the download of the amd display driver.Download process is breaking. I used different location but the result is the same.Someone help me to download this driver. Maybe someone can get another link to anot

  • RV320 Cisco Remote management fails PCI compliance

    Cisco RV320 (port 443) remote management not meet PCI, a major provider of PCI (Trustwave) compliance. Fault issues: Taken SSLv2 support (http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2005-2969) Methods HTTP Trace/track activated (http://web.nv

  • FLA/SWF to App?

    Hey people, Recently I did an application based on flash that I wanted to use on the playblook - this is my first app I thought it was as simple as loading to the top of your FLA or SWF file in Adobe Flash Builder 4.5 and more wear to a stand-alone a

  • BlackBerry Smartphone Auto keypad lock

    Download for free for those looking for BB for the automatic locking of the keyboard, lock "Tiny" BB App World. It works very well and doesn't have any upgrade hidden cost like the do rest! Enjoy!