Caution on Using Qt Speech on Android: single instance

When using Qt Speech on Android, you need to have only one single QTextToSpeech object to have proper locale setup. Otherwise setLanguage() call via JNI fails.

What a day(lol).

안드로이드에서 Qt Speech 사용시 유의점: 단일 인스턴스


QTextToSpeech를 단일 instance로 생성해서 공유 사용해야 로케일 설정이 제대로 됩니다. 이렇게 하지 않으면 JNI를 통해 setLanguage()를 호출할때 locale 설정이 안되는 문제가 생기더군요.



역시 삽질도 하기 나름입니다.

First impressions on Android programming

During the holidays I could have a chance to dig into Android programming and got some short thought. I share them here, hoping that these would help someone else.
  • The programming environment of Android is literally fantastic. Now I can understand why a lot of companies are seriously considering Android in their embedded environment.
  • Java is...... too slow(OTL). Damn slow. I can't wait for the delay
  • I could, eventually, build Qt for Android in Windows
    • Build environment: Qt 5.9.2 + SDK Level 19 + NDK r15c + BuildTools 26.0.2 + JDK 8 + Windows 10 64bit (find_java.bat in Android SDK can't find JDK 9. -_-)
    • Qt Creator 4.4.0 can't recognize SDK Buildtools 26.X. At least 4.4.1 is needed
    • QTextToSpeech seems to fix the locale to system in Android, and can't be changed(In Java you can). However, considering that I accidentally hear TTS in other locale in the app, we may have some change(or it may be simply and error)

안드로이드 프로그래밍 경험기

그간 연휴도 있고 해서 안드로이드 프로그래밍을 좀 각잡고 파고들었습니다. 몇가지 단상들이 남아서 혹시 도움이 될까 하여 정리해봅니다.
  • Android의 프로그래밍 환경은 정말 기립박수를 치고 싶을 정도로 훌륭함. 왜 많은 회사들이 Android를 임베디드 환경에서 매우 긍정적으로 검토하는지 이해가 됨
  • Java는...... 매우 느림(OTL). 답답함. 못써먹겠음
  • 수많은 삽질 끝에 Windows에서 Qt for Android 빌드 성공
    • Qt 5.9.2 + SDK Level 19 + NDK r15c + BuildTools 26.0.2 + JDK 8 + Windows 10 64bit 기반(JDK 9은 Android SDK의 find_java.bat가 인식을 못하더군요. -_-)
    • Qt Creator 4.4.0은 SDK Buildtools 26.X대를 정상적으로 인식하지 못함. 최소 4.4.1이 필요
  • QTextToSpeech는 locale이 시스템 로케일로 고정되며, 변경할 수 없는 것으로 생각됨(Java에선 가능한디......). 하지만 테스트 앱에서 시스템 로케일을 변경하지 않은 상태에서 다른 로케일의 TTS 출력이 가능했던걸 보면, 어쩌면 방법이 있을지도 모름(아니면 단순 오동작이었을지도......).

PostgreSQL vs. SQLite: read & write in multithreaded environment

The start was humble. I needed to cache some data, and I thought just push them to database table and give index, and the rest will be datab...

Popular in Code{nested}