diff --git a/app/build.gradle b/app/build.gradle index 47909d9b9..ec5815b9b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,8 +28,8 @@ android { applicationId "com.geeksville.mesh" minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works) targetSdkVersion 29 - versionCode 20000 // format is Mmmss (where M is 1+the numeric major number - versionName "1.0.00" + versionCode 20100 // format is Mmmss (where M is 1+the numeric major number + versionName "1.1.00" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -46,7 +46,7 @@ android { defaultConfig { // We have to list all translated languages here, because some of our libs have bogus languages that google play // doesn't like and we need to strip them (gr) - resConfigs "cs", "de", "el", "en", "es", "fi", "fr", "ga", "ht", "it", "ja", "nl", "no", "pt", "ro", "ru", "sk", "sl", "sq", "sv", "tr", "zh" + resConfigs "cs", "de", "el", "en", "es", "fi", "fr", "ga", "ht", "it", "ja", "ko", "nl", "no", "pt", "ro", "ru", "sk", "sl", "sq", "sv", "tr", "zh" // Needed to make mapbox work inside the firebase testlab - FIXME, alas, still doesn't work ndk { @@ -136,7 +136,7 @@ dependencies { // For now I'm not using javalite, because I want JSON printing //implementation 'com.google.protobuf:protobuf-java:3.11.1' //implementation 'com.google.protobuf:protobuf-java-util:3.11.1' - implementation 'com.google.protobuf:protobuf-javalite:3.12.2' + implementation 'com.google.protobuf:protobuf-javalite:3.13.0' // For UART access // implementation 'com.google.android.things:androidthings:1.0' @@ -146,7 +146,7 @@ dependencies { implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.1' // mapbox specifies a really old version of okhttp3 which causes lots of API warnings. trying a newer version - implementation 'com.squareup.okhttp3:okhttp:4.8.1' + implementation 'com.squareup.okhttp3:okhttp:4.9.0' // location services implementation 'com.google.android.gms:play-services-location:17.0.0' diff --git a/app/src/main/java/com/geeksville/mesh/MainActivity.kt b/app/src/main/java/com/geeksville/mesh/MainActivity.kt index 00bdf9dd3..2c774ddc9 100644 --- a/app/src/main/java/com/geeksville/mesh/MainActivity.kt +++ b/app/src/main/java/com/geeksville/mesh/MainActivity.kt @@ -735,6 +735,8 @@ class MainActivity : AppCompatActivity(), Logging, } } + private var connectionJob: Job? = null + private val mesh = object : ServiceClient({ @@ -777,7 +779,7 @@ class MainActivity : AppCompatActivity(), Logging, at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1076) */ - mainScope.handledLaunch { + connectionJob = mainScope.handledLaunch { model.meshService = service usbDevice?.let { usb -> @@ -813,6 +815,7 @@ class MainActivity : AppCompatActivity(), Logging, } debug("connected to mesh service, isConnected=${model.isConnected.value}") + connectionJob = null } } @@ -825,8 +828,12 @@ class MainActivity : AppCompatActivity(), Logging, private fun bindMeshService() { debug("Binding to mesh service!") // we bind using the well known name, to make sure 3rd party apps could also - if (model.meshService != null) + if (model.meshService != null) { + /* This problem can occur if we unbind, but there is already an onConnected job waiting to run. That job runs and then makes meshService != null again + I think I've fixed this by cancelling connectionJob. We'll see! + */ Exceptions.reportError("meshService was supposed to be null, ignoring (but reporting a bug)") + } try { MeshService.startService(this) // Start the service so it stays running even after we unbind @@ -844,6 +851,11 @@ class MainActivity : AppCompatActivity(), Logging, // it, then now is the time to unregister. // if we never connected, do nothing debug("Unbinding from mesh service!") + connectionJob?.let { job -> + connectionJob = null + warn("We had a pending onConnection job, so we are cancelling it") + job.cancel("unbinding") + } mesh.close() model.meshService = null } diff --git a/app/src/main/java/com/geeksville/mesh/model/UIState.kt b/app/src/main/java/com/geeksville/mesh/model/UIState.kt index a673dd6e8..a73508656 100644 --- a/app/src/main/java/com/geeksville/mesh/model/UIState.kt +++ b/app/src/main/java/com/geeksville/mesh/model/UIState.kt @@ -28,7 +28,7 @@ fun getInitials(nameIn: String): String { val initials = when (words.size) { in 0..minchars - 1 -> { - val nm = name.filterNot { c -> c.toLowerCase() in "aeiou" } + val nm = name.first() + name.drop(1).filterNot { c -> c.toLowerCase() in "aeiou" } if (nm.length >= nchars) nm else name } else -> words.map { it.first() }.joinToString("") diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml new file mode 100644 index 000000000..9f2dfc793 --- /dev/null +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -0,0 +1,77 @@ + + + Meshtastic + 설정 + 채널명 + 채널옵션 + 공유하기 + QR코드 + 해제 + 연결상태 + 앱아이콘 + 무명 사용자 이름 + 사용자 아바타 + 캐시를 찾았습니다. 키 큰 호랑이 옆에 있는데, 좀 무섭습니다. + 보내기 + 아직 스마트폰과 라디오 장치와 페어링을 하지 않았습니다. 장치와 페러링을 하고 사용자 이름을 정하세요. 이 오픈 소스 응용 프로그램은 알파 테스트중입니다. 문제가 발견되면 포럼(meshtastic.discourse.group)을 통해 알려주세요. 자세한 정보는 웹페이지(www.meshtastic.org)를 참조하세요. + 사용자 이름 해제 + 이름 + 익며의 사용 통계와 충돌 보고서 + Meshtastic 장치 찾는 중... + 본 앱은 블루투스에 대한 접근 권한이 필요합니다. 안드로이드 설정에서 권한을 부여하세요. + 에러 - 본 앱은 블루투스를 필요로 합니다. + 페어링 시작 + 페어링 실패 + Meshtastic 메시에 연결을 위한 URL + 승인 + 취소 + 채널 변경 + 채널 변경을 원하세요? 채널 설정이 공유되기 전까지 다른 노드와의 통신은 중단됩니다. + 새로운 채널 URL 수신 + \'%s\' 채널로 변경할 까요? + 분석이 비활성화 되었습니다. 현재 앱에서 사용하는 지도 제공자(mapbox)의 \'무료\' 계정을 사용하기 위해서는 분석을 활성화 해야합니다. 따라서 기본적으로 지도를 비활성화 시켰습니다. 만약 지도를 보길 원한다면 설정 창에서 분석 설정을 켜야합니다(또한, 앱을 강제 재부팅해야 할 수도 있습니다). 만약 mapbox 사용에 대해서 기여하길 원하거나 다른 지도 제공자로 바꾸길 원한다면 프ㅗ럼에 글을 게시하세요. + 필요로 하는 권한을 얻지 못했습니다. Meshtastic는 정확히 작동하지 않을 수도 있습니다. 안드로이드 앱 설정에서 권한을 설정하세요. + 라디오가 잠자기 중이므로 채널을 변경할 수 없습니다. + 버그 보고 + 버그 보고 + 버그를 보고하길 원하시나요? 보고 후에, 당신이 발견한 것도 보고를 일치시킬 수 있도록 포럼(meshtastic.discourse.group)에 글을 게시하세요. + 보고 + 라디로 선택 + 현재 %s 라디오 장치와 페러링 되었습니다. + 아직 라디오 장차와 페어링 되지 않았습니다. + 라디오 변경 + 안드로이드 설정에서 장치를 페어링하세요. + 페어링 완료, 서비스를 시작합니다. + 페어링 실패, 다시 선택하세요. + 위치 접근 권한 해제중, 매시에 위치를 제공할 수 없습니다. + 공유 + 연결 해제 + 장치 잠자기 + 연결: %s 온라인( 전체 %s) + 네트워크안은 모든 노드의 목록 + 펌웨어 업데이트 + 라디오로 연결됨 + 라디오로 연결됨 (%s) + 연결되지 않음, 아래에서 라이오를 선택하세요. + 라디오에 연결됨, 해당 라이도는 잠자기중. + %s로 업데이트 + 너무 오래된 앱 + 구글 플레이이 스토어 또는 깃허브를 통해서 앱을 업데이이트 해야합니다. 앱의 버전의 너무 구형입니다. + 없음 (비활성화) + 짧은 거리 (빠른 속도) + 중간 거리 (빠른 속도) + 먼 거리 (느린 속도) + 아주 먼 거리 (느린 속도) + 알 수 없음 + Meshtastic 서비스 알림 + 안드로이드 세팅에서 높은 정확도의 위치 설정을 켜세요. + About + 매시 안의 모든 노드 목록 + 문자 메세지 + 이 채널 URL은 잘못 되었습니다. 따라서 사용할 수 없습니다. + 다음에 + 지금 평가 + 이 앱은 상업적인 목적으로 만들어 진 것이 아닙니다. 개발자의 노고를 치하하기 위해서 평가를 해주시겠어요? 만약 버그를 발견하면 해당 포럼에 알려주세요. 고맙습니다. + 하지 않음 + Meshtastic 평가 + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 70a2cdb51..20fef1900 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.4.0' + ext.kotlin_version = '1.4.10' ext.coroutines_version = "1.3.9" repositories { @@ -21,7 +21,7 @@ buildscript { // Check that you have the Google Services Gradle plugin v4.3.2 or later // (if not, add it). classpath 'com.google.gms:google-services:4.3.3' - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0' // protobuf plugin - docs here https://github.com/google/protobuf-gradle-plugin classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12' diff --git a/geeksville-androidlib b/geeksville-androidlib index 775502e99..af1a758b0 160000 --- a/geeksville-androidlib +++ b/geeksville-androidlib @@ -1 +1 @@ -Subproject commit 775502e999b06c1e8effbfd631b1924d998b0570 +Subproject commit af1a758b0d4ed0b98e412d0aa03195d30f95127a