Skip to content

Commit 6c14c1c

Browse files
committed
Set type start Server
1 parent f5f6e7c commit 6c14c1c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

pythonforandroid/bootstraps/common/build/src/main/java/org/kivy/android/PythonService.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,26 @@ public class PythonService extends Service implements Runnable {
3939
private Intent startIntent = null;
4040

4141
private boolean autoRestartService = false;
42+
private int start = START_NOT_STICKY;
4243

4344
public void setAutoRestartService(boolean restart) {
4445
autoRestartService = restart;
4546
}
4647

48+
public void setTypeStartSticky() {
49+
start = START_STICKY;
50+
}
51+
52+
public void setTypeStartNotSticky() {
53+
start = START_NOT_STICKY;
54+
}
55+
56+
public void setTypeStartRedeliverIntent() {
57+
start = START_REDELIVER_INTENT;
58+
}
59+
4760
public int startType() {
48-
return START_NOT_STICKY;
61+
return start;
4962
}
5063

5164
@Override

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy