Software Archive
Read-only legacy content
17061 Discussions

Run in background

syekhui_w_
Beginner
399 Views

Hi, 

I'm building an app that can be run in background. But the only way i can test the background function is by build and download the apk to install on real devices. Is there any test method or ways i can test the run in background function whithout need to install on real devices?  I have tested with Emulator, App preview and test tab, but to not avail. I have no idea i can test this in a faster way.

 

 

0 Kudos
3 Replies
PaulF_IntelCorp
Employee
399 Views

Only on a real device, the Emulate tab and App Preview won't help you with that level of debugging. Not sure if you could test that with the Debug tab, either.

One thing you can do, to make debugging better is use remote CDT, as described here: https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview#RemoteChromeDevTools

0 Kudos
Arua_C_
Beginner
399 Views

Hi,

Could you recommend "run in background" plugin ?

0 Kudos
PaulF_IntelCorp
Employee
399 Views

Arua -- running in the background should be limited to non-UI services that are part of a plugin. This insures that the mobile OS can manage the available memory of the device to service the device UI and the currently active app, and also allows it to manage the CPU and battery usage of all apps on the device.

For an example of such a plugin, see this cordova geolocation background plugin > https://github.com/christocracy/cordova-plugin-background-geolocation. There are many other examples, but they all tend to be written for a specific purpose, so you may have to modify an existing plugin to get what you need. Trying to background your entire app is not a good idea.

0 Kudos
Reply