BlackPearl
BlackPearl

Reputation: 2795

How to implement PhoneGap Android background service

I am trying to implement the example on this page phonegap-android-background-service but so far having a problem getting it to work.

My error reports;

Error: Plugin unable to bind to background service

then a javascript alert;

ErrorCode: -4, Success: false, RegisteredForUpdates:false,RegisteredForBootStart:false,ErrorMessage: Plugin unable to to bind to background service,ServiceRunning: false

Android Device os: 4.2.1 jELLY Bean

Cordova Version: 2.9 RC 1

Upvotes: 1

Views: 663

Answers (2)

sac
sac

Reputation: 97

Follow the Steps 1) Go to Assets->www Folder->myService-2.7.0 set package path

cordova.define( 'cordova/plugin/myService', function(require, exports, module) {
CreateBackgroundService('com.yournamespace.yourappname.MyService', require, exports, module); });

Change ->com.yournamespace.yourappname

this path as your package name.

Upvotes: 2

Mirlo
Mirlo

Reputation: 674

you need an Android platform at least 4.4.x (kitkat)

Upvotes: 0

Related Questions