mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Re-enable debug application IDs (#3607)
This commit is contained in:
parent
e9bc9c9b15
commit
78a10118a0
5 changed files with 15 additions and 14 deletions
|
|
@ -111,6 +111,6 @@ constructor(
|
|||
Timber.e("Failed to start service from activity - but ignoring because bind will work: ${ex.message}")
|
||||
}
|
||||
|
||||
connect(activity, MeshService.createIntent(), BIND_AUTO_CREATE + BIND_ABOVE_CLIENT)
|
||||
connect(activity, MeshService.createIntent(activity), BIND_AUTO_CREATE + BIND_ABOVE_CLIENT)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ class MeshService : Service() {
|
|||
startService(context)
|
||||
}
|
||||
|
||||
fun createIntent() = Intent().setClassName("com.geeksville.mesh", "com.geeksville.mesh.service.MeshService")
|
||||
fun createIntent(context: Context) = Intent(context, MeshService::class.java)
|
||||
|
||||
/**
|
||||
* The minimum firmware version we know how to talk to. We'll still be able to talk to 2.0 firmwares but only
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class ServiceStarter(appContext: Context, workerParams: WorkerParameters) : Work
|
|||
// Indicate whether the task finished successfully with the Result
|
||||
Result.success()
|
||||
} catch (ex: Exception) {
|
||||
Timber.e("failure starting service, will retry", ex)
|
||||
Timber.e(ex, "failure starting service, will retry")
|
||||
Result.retry()
|
||||
}
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ fun MeshService.Companion.startService(context: Context) {
|
|||
// to Signal or whatever.
|
||||
Timber.i("Trying to start service debug=${BuildConfig.DEBUG}")
|
||||
|
||||
val intent = createIntent()
|
||||
val intent = createIntent(context)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
try {
|
||||
context.startForegroundService(intent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue