File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
pythonforandroid/bootstraps/sdl2/build Expand file tree Collapse file tree 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(
302302
303303 setenv ("ANDROID_PRIVATE" , android_private , 1 );
304304 setenv ("ANDROID_ARGUMENT" , android_argument , 1 );
305+ setenv ("ANDROID_APP_PATH" , android_argument , 1 );
305306 setenv ("ANDROID_ENTRYPOINT" , service_entrypoint , 1 );
306307 setenv ("PYTHONOPTIMIZE" , "2" , 1 );
307308 setenv ("PYTHON_NAME" , python_name , 1 );
Original file line number Diff line number Diff line change 99import android .app .Notification ;
1010import android .app .PendingIntent ;
1111import android .os .Process ;
12+ import java .io .File ;
1213
1314import org .kivy .android .PythonUtil ;
1415
@@ -110,7 +111,9 @@ public void onDestroy() {
110111
111112 @ Override
112113 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 );
114117 this .mService = this ;
115118 nativeStart (
116119 androidPrivate , androidArgument ,
Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ protected void doStartForeground(Bundle extras) {
3838
3939 static public void start (Context ctx , String pythonServiceArgument ) {
4040 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 () );
4343 intent .putExtra ("androidArgument" , argument );
4444 intent .putExtra ("serviceEntrypoint" , "{{ entrypoint }}" );
4545 intent .putExtra ("pythonName" , "{{ name }}" );
You can’t perform that action at this time.
0 commit comments