This is a migrated thread and some comments may be shown as answers.

Android Cordova flaky on first load

4 Answers 65 Views
Apache Cordova
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert
Top achievements
Rank 1
Robert asked on 13 Aug 2014, 09:08 AM
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

4 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 18 Aug 2014, 06:50 AM
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.

 
0
Robert
Top achievements
Rank 1
answered on 18 Aug 2014, 07:58 AM
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
0
Robert
Top achievements
Rank 1
answered on 18 Aug 2014, 08:35 AM
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.
0
Kaloyan
Telerik team
answered on 20 Aug 2014, 11:03 AM
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.

 
Tags
Apache Cordova
Asked by
Robert
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Robert
Top achievements
Rank 1
Share this question
or