android - Service and cordova plugin -


i know best way solve problem. , problem following.

i have developed android app using cordova. native android code minimum required.

what need is, when app starts, start service it. when app closes service must remain running. service communicates server , downloads if "something" exists. after download event service must notify user start initial app , see results or, better, service start initial app.

what best way implement this, taking account don't want discard app in cordova.

i've examined plugin creation since code of original app , service code same. is cordova plugin best way implement service? can cordova plugin service purpose or totally wrong?

is possible use javascript code in plugin?

do need pass native code in order accomplish need?

thank in advance

george

as far tried out cordova android plugin runs while app running. after closed, stops.

but there plugin available brings background serivce support. https://github.com/red-folder/bgs-core

http://red-folder.blogspot.de/

the java background service runs on, if app closed no longer provide javascript event handlings. background service code want use if app closed, has written in native android java.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -