1
1
package {{ args .package }};
2
2
3
+ import android .os .Binder ;
4
+ import android .os .IBinder ;
3
5
import android .content .Intent ;
4
6
import android .content .Context ;
5
7
import org .kivy .android .PythonService ;
@@ -31,7 +33,7 @@ public boolean getStartForeground() {
31
33
{% endif %}
32
34
33
35
public static void start (Context ctx , String pythonServiceArgument ) {
34
- String argument = ctx .getFilesDir ().getAbsolutePath ();
36
+ String argument = ctx .getFilesDir ().getAbsolutePath () + "/app" ;
35
37
Intent intent = new Intent (ctx , Service {{ name |capitalize }}.class );
36
38
intent .putExtra ("androidPrivate" , argument );
37
39
intent .putExtra ("androidArgument" , argument );
@@ -45,7 +47,7 @@ public static void start(Context ctx, String pythonServiceArgument) {
45
47
intent .putExtra ("pythonServiceArgument" , pythonServiceArgument );
46
48
ctx .startService (intent );
47
49
}
48
-
50
+
49
51
public static void stop (Context ctx ) {
50
52
Intent intent = new Intent (ctx , Service {{ name |capitalize }}.class );
51
53
ctx .stopService (intent );
@@ -58,7 +60,7 @@ public static void stop(Context ctx) {
58
60
public IBinder onBind (Intent intent ) {
59
61
return mBinder ;
60
62
}
61
-
63
+
62
64
/**
63
65
* Class used for the client Binder. Because we know this service always
64
66
* runs in the same process as its clients, we don't need to deal with IPC.
0 commit comments