Skip to content

Commit

Permalink
Merge pull request #33 from mitsuya99/master
Browse files Browse the repository at this point in the history
Changed so that external package service can be started
  • Loading branch information
ToniKorin committed Jun 27, 2019
2 parents 5bda692 + ac2b452 commit 0e7e3ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/android/AppStarter.java
Expand Up @@ -45,9 +45,10 @@ public void run(Context context, Intent intent, int componentState, boolean onAu
}
// Start a service in the background.
String serviceClassName = sp.getString(AutoStart.SERVICE_CLASS_NAME, "");
String servicePackageName = serviceClassName.substring(0, serviceClassName.lastIndexOf("."));
if ( !serviceClassName.equals("") ) {
Intent serviceIntent = new Intent();
serviceIntent.setClassName(context, serviceClassName);
serviceIntent.setClassName(servicePackageName, serviceClassName);
if ( onAutostart ) {
serviceIntent.putExtra(CORDOVA_AUTOSTART, true);
}
Expand Down

0 comments on commit 0e7e3ad

Please sign in to comment.