Skip to content

Commit bc06cc8

Browse files
committed
Fix Service.templ.java
1 parent d356876 commit bc06cc8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pythonforandroid/bootstraps/service_only/build/templates/Service.tmpl.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package {{ args.package }};
22

3+
import android.os.Binder;
4+
import android.os.IBinder;
35
import android.content.Intent;
46
import android.content.Context;
57
import org.kivy.android.PythonService;
@@ -31,7 +33,7 @@ public boolean getStartForeground() {
3133
{% endif %}
3234

3335
public static void start(Context ctx, String pythonServiceArgument) {
34-
String argument = ctx.getFilesDir().getAbsolutePath();
36+
String argument = ctx.getFilesDir().getAbsolutePath() + "/app";
3537
Intent intent = new Intent(ctx, Service{{ name|capitalize }}.class);
3638
intent.putExtra("androidPrivate", argument);
3739
intent.putExtra("androidArgument", argument);
@@ -45,7 +47,7 @@ public static void start(Context ctx, String pythonServiceArgument) {
4547
intent.putExtra("pythonServiceArgument", pythonServiceArgument);
4648
ctx.startService(intent);
4749
}
48-
50+
4951
public static void stop(Context ctx) {
5052
Intent intent = new Intent(ctx, Service{{ name|capitalize }}.class);
5153
ctx.stopService(intent);
@@ -58,7 +60,7 @@ public static void stop(Context ctx) {
5860
public IBinder onBind(Intent intent) {
5961
return mBinder;
6062
}
61-
63+
6264
/**
6365
* Class used for the client Binder. Because we know this service always
6466
* runs in the same process as its clients, we don't need to deal with IPC.

0 commit comments

Comments
 (0)