Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pythonforandroid/bootstraps/sdl2/build/jni/src/start.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ JNIEXPORT void JNICALL Java_org_kivy_android_PythonService_nativeStart(

setenv("ANDROID_PRIVATE", android_private, 1);
setenv("ANDROID_ARGUMENT", android_argument, 1);
setenv("ANDROID_APP_PATH", android_argument, 1);
setenv("ANDROID_ENTRYPOINT", service_entrypoint, 1);
setenv("PYTHONOPTIMIZE", "2", 1);
setenv("PYTHON_NAME", python_name, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import android.app.Notification;
import android.app.PendingIntent;
import android.os.Process;
import java.io.File;

import org.kivy.android.PythonUtil;

Expand Down Expand Up @@ -110,7 +111,9 @@ public void onDestroy() {

@Override
public void run(){
PythonUtil.loadLibraries(getFilesDir());
String app_root = getFilesDir().getAbsolutePath() + "/app";
File app_root_file = new File(app_root);
PythonUtil.loadLibraries(app_root_file);
this.mService = this;
nativeStart(
androidPrivate, androidArgument,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ protected void doStartForeground(Bundle extras) {

static public void start(Context ctx, String pythonServiceArgument) {
Intent intent = new Intent(ctx, Service{{ name|capitalize }}.class);
String argument = ctx.getFilesDir().getAbsolutePath();
intent.putExtra("androidPrivate", argument);
String argument = ctx.getFilesDir().getAbsolutePath() + "/app";
intent.putExtra("androidPrivate", ctx.getFilesDir().getAbsolutePath());
intent.putExtra("androidArgument", argument);
intent.putExtra("serviceEntrypoint", "{{ entrypoint }}");
intent.putExtra("pythonName", "{{ name }}");
Expand Down