Android Cordova flaky on first load

5 posts, 0 answers
  1. Robert
    Robert avatar
    20 posts
    Member since:
    Sep 2010

    Posted 13 Aug 2014 Link to this post

    Hi,

    I've built a Cordova 3.2.0 app using Telerik AppBuilder. Works perfectly on the simulator and on iOS.

    Works fine on Android once it's "warmed up". However, I'm getting random issue from users on various devices with the toolbar not loading, only half the screen loading, app unresponsive etc.

    Only happens on first load after a fresh install or update and is usually rectified by a reboot or two. Most recent recent report was 5 reboots to get it working smoothly!

    My best guess is it's caching some of the HTML or Javascript assets and takes a few reboots to force the cache to clear? As I say, it works perfectly on iOS.

    Any ideas?

    Thanks,

    Rob
  2. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 18 Aug 2014 Link to this post

    Hi Robert,

    Thank you for reaching us.

    It is hard to guess what could be causing such behavior within your application. Perhaps we will be able to tell if you provide us with a bit more details on the matter. For example, if you can reproduce the issue on your side please share what exactly you mean by  "flaky". Also, it will be useful to know if while deployed on actual Android device there are any warnings or errors in the console. Thank you for this in advance.

    Further if you think that this could be a caching matter, you can try and use this plugin to clear it. Here is a guide on how to import it inside your application.

    I hope this helps.

    Regards,
    Kaloyan
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
  3. Robert
    Robert avatar
    20 posts
    Member since:
    Sep 2010

    Posted 18 Aug 2014 in reply to Kaloyan Link to this post

    Hi Kaloyan,

    http://www.oxforddictionaries.com/definition/english/flaky

    "Liable to act in an unconventional or eccentric way"

    Or as I explained:

    "I'm getting random issues from users on various devices with the toolbar not loading, only half the screen loading, app unresponsive etc."

    Anyway.

    I'll try the caching plugin and see if the issue goes away. Looks like that could be it.

    Thanks,

    Rob
  4. Robert
    Robert avatar
    20 posts
    Member since:
    Sep 2010

    Posted 18 Aug 2014 Link to this post

    Followed the instructions to install the plugin but it didn't work, something about require function missing.

    I'll try appending a version querystring to the script and style references, e.g.

    <script src="scripts/app.js?v=4"></script>

    Really though, shouldn't Cordova / AppBuilder just disable the browser cache by default? I can't imagine there any performance advantages of caching as all the resources are local.
  5. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 20 Aug 2014 Link to this post

    Hello Robert,

    I managed to import the cache plugin in a Blank AppBuilder project. Please find it attached.

    Further, I noticed that the same inquiry is being discussed in another support ticket that you have opened. I suggest to continue there and if you want, to post the final solution here when found.

    I hope this is okay for you.

    Regards,
    Kaloyan
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top