Skip to content

Commit

Permalink
fix: voice input not working in Android 13
Browse files Browse the repository at this point in the history
  • Loading branch information
plateaukao committed Aug 18, 2022
1 parent bc37aa7 commit 66d06ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
8 changes: 4 additions & 4 deletions LimeStudio/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ apply plugin: 'com.android.application'
android {
signingConfigs {
}
compileSdkVersion 32
compileSdkVersion 33
buildToolsVersion '30.0.3'
defaultConfig {
applicationId "net.toload.main.hd"

minSdkVersion 19
targetSdkVersion 32
versionCode 672
versionName '6.7.2'
targetSdkVersion 33
versionCode 680
versionName '6.8.0'
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,12 @@ public static String isVoiceSearchServiceExist(Context context){

//boolean isVoiceSearchServiceEnabled = false;
for (int i = 0; i < mInputMethodProperties.size(); i++) {
InputMethodInfo imi = mInputMethodProperties.get(i);
if(DEBUG) Log.i(TAG, "enabled IM " + i + ":" + imi.getId());
String id = mInputMethodProperties.get(i).getId();

if(imi.getId().equals("com.google.android.voicesearch/.ime.VoiceInputMethodService")){
return "com.google.android.voicesearch/.ime.VoiceInputMethodService";
}else if(imi.getId().equals("com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime.VoiceInputMethodService")){
return "com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime.VoiceInputMethodService";
if(id.equals("com.google.android.voicesearch/.ime.VoiceInputMethodService") ||
id.equals("com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime.VoiceInputMethodService") ||
id.equals("com.google.android.tts/com.google.android.apps.speech.tts.googletts.settings.asr.voiceime.VoiceInputMethodService")){
return id;
}
}
return null;
Expand Down

0 comments on commit 66d06ba

Please sign in to comment.