File tree 3 files changed +7
-3
lines changed
pythonforandroid/bootstraps/sdl2/build
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -302,6 +302,7 @@ JNIEXPORT void JNICALL Java_org_kivy_android_PythonService_nativeStart(
302
302
303
303
setenv ("ANDROID_PRIVATE" , android_private , 1 );
304
304
setenv ("ANDROID_ARGUMENT" , android_argument , 1 );
305
+ setenv ("ANDROID_APP_PATH" , android_argument , 1 );
305
306
setenv ("ANDROID_ENTRYPOINT" , service_entrypoint , 1 );
306
307
setenv ("PYTHONOPTIMIZE" , "2" , 1 );
307
308
setenv ("PYTHON_NAME" , python_name , 1 );
Original file line number Diff line number Diff line change 9
9
import android .app .Notification ;
10
10
import android .app .PendingIntent ;
11
11
import android .os .Process ;
12
+ import java .io .File ;
12
13
13
14
import org .kivy .android .PythonUtil ;
14
15
@@ -110,7 +111,9 @@ public void onDestroy() {
110
111
111
112
@ Override
112
113
public void run (){
113
- PythonUtil .loadLibraries (getFilesDir ());
114
+ String app_root = getFilesDir ().getAbsolutePath () + "/app" ;
115
+ File app_root_file = new File (app_root );
116
+ PythonUtil .loadLibraries (app_root_file );
114
117
this .mService = this ;
115
118
nativeStart (
116
119
androidPrivate , androidArgument ,
Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ protected void doStartForeground(Bundle extras) {
38
38
39
39
static public void start (Context ctx , String pythonServiceArgument ) {
40
40
Intent intent = new Intent (ctx , Service {{ name |capitalize }}.class );
41
- String argument = ctx .getFilesDir ().getAbsolutePath ();
42
- intent .putExtra ("androidPrivate" , argument );
41
+ String argument = ctx .getFilesDir ().getAbsolutePath () + "/app" ;
42
+ intent .putExtra ("androidPrivate" , ctx . getFilesDir (). getAbsolutePath () );
43
43
intent .putExtra ("androidArgument" , argument );
44
44
intent .putExtra ("serviceEntrypoint" , "{{ entrypoint }}" );
45
45
intent .putExtra ("pythonName" , "{{ name }}" );
You can’t perform that action at this time.
0 commit comments