Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8295509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:37:23+00:00 2026-06-08T14:37:23+00:00

We have a Phonegap/Cordova (1.6.0) application using SenchaTouch (1) for its UI and a

  • 0

We have a Phonegap/Cordova (1.6.0) application using SenchaTouch (1) for its UI and a custom native (iOS) plugin for unzipping files in the Documents folder. The plugin does not have its own GUI.

We would like to show progress during the unzip operation by updating a progress bar (or simply a dialog) in our Sencha app. We have implemented an update function in the native plugin that uses the “writeJavascript” method to invoke Javascript code from native code.

Invoking that functionality works, but none of the GUI updates we make in our Sencha UI are actually shown, debug log statements are also not show. Only if we add a Javascript alert box in between our code we can observe that the Sencha updates are processed and that something changes in the UI. It feels as though Sencha does everything asynchronously and that code is blocked somehow.

What are we missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:37:25+00:00Added an answer on June 8, 2026 at 2:37 pm

    This was a classic example of a long running operation blocking the UI thread. I guess things never change in software development.

    The basic issue is that if you invoke a Phonegap plugin from your HTML application, the graphics thread (and there is only one thread) for your Phonegap application is blocked. The solution is simple: return as soon as you can from your plugin.

    For long running operations this means starting them in a separate thread. A very elegant mechanism on iOS is to use Grand Central Dispatch for this, as demonstrated by another Stackoverflow answer.

    You perform your long running operation in the dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ }); block and then send updates back to the Phonegap UI in the nested dispatch_async( dispatch_get_main_queue(), ^{ }); block using writeJavascript.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing application using phonegap in eclipse for android .I have created folder
I have two HTML files on my www folder using the PhoneGap framework. The
I'm working on a phonegap application using cordova 1.9. I have a syntax error
I have an application developed on iOS & Android using phonegap 1.6.0 & JQM
I am building a PhoneGap/Cordova project for iPhone. I have 2 css files -
I am making application using phonegap in android. I am using cordova 1.6.1 I
hi i have a fully working phonegap application with a number of files (both
I have a Phonegap application that uses the camera Cordova API to take a
I am creating an app using PhoneGap 1.5 (Cordova) and the ChildBrowser Plugin (newest
I am developing an application for Android using PhoneGap (Cordova 1.6.1). My application crashes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.