Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions plugin.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="com.red_folder.phonegap.plugin.backgroundservice"
version="2.0.0">
id="com.dbn.phonegap.plugin.backgroundservice"
version="2.0.1">

<name>Background Service Plugin - Core logic</name>

Expand Down Expand Up @@ -41,8 +41,7 @@
</intent-filter>
</receiver>

</config-file>

</config-file>

<source-file src="src/android/BackgroundService.java" target-dir="src/com/red_folder/phonegap/plugin/backgroundservice" />
<source-file src="src/android/BackgroundServicePlugin.java" target-dir="src/com/red_folder/phonegap/plugin/backgroundservice" />
Expand Down
8 changes: 7 additions & 1 deletion src/android/BackgroundServicePluginLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ public ExecuteResult execute(String action, JSONArray data, IUpdateListener list
(data.getString(0).length() > 0)) {

String serviceName = data.getString(0);
String serviceClassName = serviceName;
String[] serviceNameTokens = serviceName.split("`");
if(serviceNameTokens.length > 1) {
serviceClassName = serviceNameTokens[0];
serviceName = serviceNameTokens[1];
}

Log.d(TAG, "Finding servicename " + serviceName);

Expand All @@ -173,7 +179,7 @@ public ExecuteResult execute(String action, JSONArray data, IUpdateListener list
service = this.mServices.get(serviceName);
} else {
Log.d(TAG, "Creating new Service Details");
service = new ServiceDetails(this.mContext, serviceName);
service = new ServiceDetails(this.mContext, serviceClassName);
this.mServices.put(serviceName, service);
}

Expand Down