however, if the device has a low screen off time, it just shuts off during loading the app.
i know about the insomnia plugin, but this can only be invoked after cordova has fully loaded and thus not when the splashscreen is shown.
is there any switch or modification thats sets a wakelock or keeps the screen on during initilization of the app where only the splashscreen is shown?
5 Answers, 1 is accepted
I don't think this is possible in hybrid applications. This is because, in order to keep the device awake you will need to invoke native APIs and for such calls you will need Cordova, as that's what handles all the plugins and native hooks. Unfortunately, most of the time during the splashscreen is spent in the Cordova initialization, so there is no way (I can think of) to prevent device sleep.
Still, there might be a way to work around the issue by optimizing the initialization of the application. I would suggest you to check what is taking most time and investigate why this is happening. Further, you should know that Cordova is fully initialized after the deviceready event, so there might be a way to move some of the other logic behind in the initial start.
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.
however, it is only the case on first app start where it seems to take forever on some low end devices.
any additional start does not take that huge amount of time to load, also there is not much going on, before the deviceready event is fired.
You can further check if there are any unused plugins enabled in the project. If so, disabling them could drastically decrease the initialization time of your app. You will find a list of all enabled/disabled plugin in the Plugins tab of your project's properties.
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.
already optimized the plugin list and currently only use the necessary cordova plugins.
for testing i also completely disabled all cordova plugins and the first start still takes significantly longer than any of the following starts, even if the app is no longer in memory.
however this only applies to low end android devices, neither iOS nor WP have this drastic difference in app start performance.
the affected low end devices are mainly still on Android 2.3.x, which is still used by quite a lot of users, appearently i have no access to "higher end" devices still running this old android version to determine if it is the os version or just these old devices themselves ...
guess this is just the way that low end devices are really slow nowadays
Indeed, the issue could be due to Android 2.2.x in a combination with the device's hardware. Please, try with newer Android device, if you have a chance and let us know if the issue is present there as well.
Regards,
Kaloyan
Telerik
Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.