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
|
|
@ -61,6 +61,8 @@ You can generate the documentation locally to preview your changes.
|
|||
You can help translate the app into your native language using [Crowdin](https://crowdin.meshtastic.org/android).
|
||||
|
||||
## Building the Android App
|
||||
> [!WARNING]
|
||||
> Debug and release builds can be installed concurrently. This is solely to enable smoother development, and you should avoid running both apps simultaneously. To ensure proper function, force quit the app not in use.
|
||||
|
||||
https://meshtastic.org/docs/development/android/
|
||||
|
||||
|
|
|
|||
|
|
@ -173,16 +173,15 @@ secrets {
|
|||
|
||||
// workaround for https://github.com/google/ksp/issues/1590
|
||||
androidComponents {
|
||||
/** Disabling until this works w/ bluetooth */
|
||||
// onVariants(selector().all()) { variant ->
|
||||
// if (variant.name == "fdroidDebug") {
|
||||
// variant.applicationId = "com.geeksville.mesh.fdroid.debug"
|
||||
// }
|
||||
//
|
||||
// if (variant.name == "googleDebug") {
|
||||
// variant.applicationId = "com.geeksville.mesh.google.debug"
|
||||
// }
|
||||
// }
|
||||
onVariants(selector().all()) { variant ->
|
||||
if (variant.name == "fdroidDebug") {
|
||||
variant.applicationId = "com.geeksville.mesh.fdroid.debug"
|
||||
}
|
||||
|
||||
if (variant.name == "googleDebug") {
|
||||
variant.applicationId = "com.geeksville.mesh.google.debug"
|
||||
}
|
||||
}
|
||||
onVariants(selector().withBuildType("release")) { variant ->
|
||||
if (variant.flavorName == "google") {
|
||||
val variantNameCapped = variant.name.replaceFirstChar { it.uppercase() }
|
||||
|
|
|
|||
|
|
@ -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