Commit 67f4e948 authored by Philipp Auersperg's avatar Philipp Auersperg

service startet unter 7 und 8 als service, wird unter 8 aber nach 5 sec abgeschossen

parent fe0cea96
......@@ -8,7 +8,8 @@ android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.androidrpcclient"
minSdkVersion 19
// minSdkVersion 19
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
......
......@@ -88,7 +88,8 @@ class MainActivity : AppCompatActivity() {
intent.putExtra("pythonServiceArgument", "test argument ok")
try{
val res=startService(intent)
// val res=startService(intent)
val res=startForegroundService(intent)
} catch (e: Exception) {
txtStatus.text = "Exception"
txtMessage.text = e.toString()
......
......@@ -32,4 +32,6 @@ dependency apk:
- (https://stackoverflow.com/questions/11392183/how-to-check-programmatically-if-an-application-is-installed-or-not-in-android
)
- (https://stackoverflow.com/questions/4604239/install-application-programmatically-on-android)
- (https://stackoverflow.com/questions/2334955/start-a-service-from-activity)
\ No newline at end of file
- (https://stackoverflow.com/questions/2334955/start-a-service-from-activity)
Wird wohl so sein, dass wir das service als foreground mit zugehoeriger app starten muessen
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment