BackgroundService, Cordova and Evo_Things

Ask, and ye shall receive.
gerhard
Posts: 1
Joined: 21:37, 10 Feb 2015

BackgroundService, Cordova and Evo_Things

Postby gerhard » 22:03, 10 Feb 2015

I am playing around with a TI SensorTag, want to use it as a datalogger.
As I do not want do all from scratch, I am basing it on Klemens Waldhör's app, that used the EvoThings demo:
http://www.heartsome.de/de/android/andr ... ensor.html

He has agreed to to let me adopt the code and put it on GitHub.
(I am cleaning up his beta a little.)

However, to be useful for me I need to run it as a background service. The same should apply for many internet-of-things apps.
Similar questions have been discussed on the forum, they seem to be focused on enable app when notification, not suitable for me.
It should be possible to let the SensorTag button appear as regular buttons to in Android.
(My goal is to let an external sensor as the TI SensorTag appear as an internal sensor, I assume that Xposed is required for this, if it is possible at all. (The ultimate goal is to get something like the stryd.com, that requires firmware changes too.))
Many of this can only be done in Android, whic´h is the only I am interested in myself, the GUI app should be possible in IOS too.

The way I have seen that this is possible is with the Red-Folder BackgroundService plugin:
https://github.com/Red-Folder/Cordova-P ... undService
The plugin is not updated after Cordova 3.1 though.
The BackgroundService has to written as a pure Android Java Activity.

Anyone with experience of the BackgroundService plugin?
Any problem with using Cordova 3.1 with EvoThings, or must testing GUI with EvoThings be separate from building real Android Cordova app?

User avatar
micke
Posts: 256
Joined: 20:49, 18 Nov 2013

Re: BackgroundService, Cordova and Evo_Things

Postby micke » 19:50, 17 Feb 2015

Hi Gerhard,

Thanks for posting, and sorry for the slow response.

To begin with your last question, you can use any Cordova version with Evothings Workbench. In place of Evothings Client, you use your Cordova app and configure it to connect to the Workbench. Then you will get the live reload on save functionality, which is faster than rebuilding the app on every iteration. There is information about how to do this here:

http://evothings.com/cordova-starter-kit/
http://evothings.com/doc/build/cordova- ... rEvothings

Regarding running a Cordova app with a background service, I would guess that needs something like the plugin you have found. Possibly with some tweaking of AndroidManifest.xml (it can also be that the plugin updates AndroidManifest.xml with the needed parameters).

Did some googling and I think I found only what you already have found:

https://github.com/Red-Folder/bgs-core/ ... nd-Service
http://stackoverflow.com/questions/2458 ... nd-service
http://forum.ionicframework.com/t/how-t ... rvice/6677

Sorry that I don't have more specific help to offer. Please feel free to post updates and/or ask additional questions. I would assume that there is general interest in doing these sorts of more advanced Android apps.
Background processing should be of importance to IoT apps.

Best regards, Mikael


Return to “Questions and answers”

Who is online

Users browsing this forum: No registered users and 50 guests