Kaljurand / K6nele-service

Kõnele service is an Android app that offers a speech-to-text service to other apps, in particular to Kõnele. It implements SpeechRecognizer, backed by an open source speech recognition server software https://github.com/alumae/kaldi-gstreamer-server.
Apache License 2.0
39 stars 0 forks source link

Permissions in Android 11 > #6

Open backupandforkacc opened 2 years ago

backupandforkacc commented 2 years ago

I recursively cloned the folder as recommended in the readme. I build the App in Android Studio and gave it a run. When starting the service via a keyboard, the window for K6nele opens, but shows a message "insufficient permission". In the settings, I can only give permission "once" or "when using the app". I set it to "when using the app".

Could you please add some info with which systems you have tested the service? I do not use google playstore or else I would test this app.

Here is the logcat:

2021-12-25 19:18:58.296 16448-16448/? I/d.k6neleservic: Late-enabling -Xcheck:jni
2021-12-25 19:18:58.322 16448-16448/? I/d.k6neleservic: Unquickening 12 vdex files!
2021-12-25 19:18:58.693 16448-16448/ee.ioc.phon.android.k6neleservice D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-12-25 19:18:58.694 16448-16448/ee.ioc.phon.android.k6neleservice D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-12-25 19:18:58.296 16448-16448/? I/d.k6neleservic: Late-enabling -Xcheck:jni
2021-12-25 19:18:58.322 16448-16448/? I/d.k6neleservic: Unquickening 12 vdex files!
2021-12-25 19:18:58.693 16448-16448/ee.ioc.phon.android.k6neleservice D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-12-25 19:18:58.694 16448-16448/ee.ioc.phon.android.k6neleservice D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-12-25 19:18:59.237 16448-16448/ee.ioc.phon.android.k6neleservice W/d.k6neleservic: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
2021-12-25 19:18:59.242 16448-16448/ee.ioc.phon.android.k6neleservice W/d.k6neleservic: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
2021-12-25 19:18:59.658 16448-16496/ee.ioc.phon.android.k6neleservice I/AdrenoGLES-0: QUALCOMM build                   : e883189, Ia11ce2d146
    Build Date                       : 09/02/20
    OpenGL ES Shader Compiler Version: EV031.31.04.00
    Local Branch                     : gfx-adreno.lnx.2.0
    Remote Branch                    : quic/gfx-adreno.lnx.2.0
    Remote Branch                    : NONE
    Reconstruct Branch               : NOTHING
2021-12-25 19:18:59.658 16448-16496/ee.ioc.phon.android.k6neleservice I/AdrenoGLES-0: Build Config                     : S L 10.0.5 AArch64
2021-12-25 19:18:59.659 16448-16496/ee.ioc.phon.android.k6neleservice I/AdrenoGLES-0: Driver Path                      : /vendor/lib64/egl/libGLESv2_adreno.so
2021-12-25 19:18:59.680 16448-16496/ee.ioc.phon.android.k6neleservice I/AdrenoGLES-0: PFP: 0x005ff113, ME: 0x005ff066
2021-12-25 19:18:59.681 16448-16496/ee.ioc.phon.android.k6neleservice W/AdrenoUtils: <ReadGpuID_from_sysfs:197>: Failed to open /sys/class/kgsl/kgsl-3d0/gpu_model
2021-12-25 19:18:59.681 16448-16496/ee.ioc.phon.android.k6neleservice W/AdrenoUtils: <ReadGpuID:221>: Failed to read chip ID from gpu_model. Fallback to use the GSL path
2021-12-25 19:18:59.843 16448-16448/ee.ioc.phon.android.k6neleservice W/ListPreference: Setting a summary with a String formatting marker is no longer supported. You should use a SummaryProvider instead.
2021-12-25 19:18:59.887 16448-16496/ee.ioc.phon.android.k6neleservice I/Gralloc4: mapper 4.x is not supported
2021-12-25 19:18:59.888 16448-16496/ee.ioc.phon.android.k6neleservice W/Gralloc3: mapper 3.x is not supported
2021-12-25 19:19:52.329 16448-16448/ee.ioc.phon.android.k6neleservice W/Activity: **Can request only one set of permissions at a time**
Kaljurand commented 2 years ago

I don't see the message "Can request only one set of permissions at a time" in my logs, e.g. when I launch the latest Kõnele-service from Android Studio into the emulator. So, if possible, can you provide more information:

In general I've tested with Android 11 and with a few earlier versions. Assigning the "when using the app" type of permission should be OK. It might work better if you assign the permissions directly via the system menu, rather than via the Kõnele-service and Kõnele popups (but these should also work, of course).

backupandforkacc commented 2 years ago

Took some time to test ist properly.

I cannot test anything else right now other than a Pixel 2 with Android v11.

I tested Kõnele v1.7.56 with Kõnele Service, df968c3a98bbaa159e533725b72dbb9c49e1515d (compiled and installed via Android Studio) and The Kõnele service v0.1.00 release

With the official release, the browser opens with the text K6_Y_BTN_MIC_Longpress

Instead of the Kõnele v1.7.56, I also used the keyboard, but brings me to the same error. I cannot test with

Kaljurand commented 2 years ago

Generating strings like K6_Y_BTN_MIC_LONGPRESS is a feature of Kõnele (not Kõnele-service). This happens when you long press on the microphone button. Also swipes on the microphone button are supported, e.g. a down-swipe would generate K6_Y_BTN_MIC_DOWN. The idea is that you can remap these strings to some useful strings (e.g. search queries that you often use) or even actions (IME commands or Intent calls), by using rewrite rules (e.g. https://docs.google.com/spreadsheets/d/1h7IZFTzfVQH808laHl5ekt7JJnhXgjidnVAOdklmXPs/edit?usp=sharing). This is documented (in Estonian) in http://kaljurand.github.io/K6nele/docs/et/user_guide.html#lausung-kui-nupuvajutus

A single press on the microphone button starts/stops/cancels recording. This behavior cannot be remapped in the current version. Also, you cannot currently (via the rewrite rules) map the long press to a press-and-hold recording button behavior.

Is the issue that you are trying to start the recording by long pressing? In this case press shorter. Or is the issue that the long press is always triggered for some reason, even if you press short? (In any case this does not seem to be an issue with Kõnele-service.)