In one of the devices (Redmi 8A), I have the output of
Voice.getSpeechRecognitionServices() ==> ["com.xiaomi.mibrain.speech"] and voice recognising is not working.
Voice.start() ==> undefined but
Voice.isAvailable() ==> true
Voice.isRecognizing() ==> true
but none of the following events are triggered,
Voice.onSpeechResults
Voice.onSpeechStart
Voice.onSpeechEnd
Voice.onSpeechError
Voice.onSpeechPartialResults
I tried again after installing Google App and now the device returns ["com.google.android.googlequicksearchbox", "com.xiaomi.mibrain.speech"] for Voice.getSpeechRecognitionServices() but voice is still not working. Permission is granted and I can record and play using #react-native-community/audio-toolkit.
In the logcat:
SpeechRecognizer: bind to recognition service failed
ActivityManager: Unable to start service Intent { act=android.speech.RecognitionService cmp=com.miui.voiceassist/com.xiaomi.mibrain.speech.asr.AsrService } U=0: not found
Have anyone faced the similar issue and solved this? Any suggestions?
The device is running:
Android Version 9
MIUI 11.0.3
Redmi 8A
Found out that even if you have Google services, some android phones can be configured to use other voice recognising services and it can break the flow as React Native Voice is using Google Services.
You can check which Voice services a particular Android Phone is using as following:
Settings > App Management > Default App > Assistive App and Voice Input > Assistive App
Hope this is helpful for those who might be facing the same issues.
Related
I'm trying to run desktop head unit on my pc. I set up everything exactly as this guide specifies: https://developer.android.com/training/cars/testing, (tried both 2.0 and 1.1 with the same result). It appears to connect correctly, but I can't get it do display anything other than "Waiting for phone". Console displays following:
Android Auto - Desktop Head Unit
Build: 2020-09-20-332761970
Version: 2.0-windows-beta
[W]: No configuration specified - using default values.
[E]: Could not load configuration from 'C:\Users\kkowalczyk\.android\headunit.ini'.
BoringSSL is the SSL implementation used in the receiver-lib.
Starting link. Requested protocol version: 1.6 (snapshot 314970161)
[I]: Connecting over ADB to localhost:5277...
[I]: connected.
> Phone reported protocol version 1.6
ssl state=TLS client read_server_hello -1
ssl state=TLS client process_change_cipher_spec -1
ssl state=SSL negotiation finished successfully 1
SSL version=TLSv1.2 Cipher name=ECDHE-RSA-AES128-GCM-SHA256
Verify returned: ok
I'm trying to connect to Pixel 5 (with most recent update), is there anything else I can try?
In my case, I also saw the same issue but resolve by following below steps:
Close the DHU emulator.
In the AA app, stop the HU server. Wait for a couple of seconds, start the HU server.
Stop the HU server again. Wait for a couple of seconds, start the HU server.
Start the DHU emulator.
The OOBE screen shows up on the AA app in phone. Complete the flow. While you are completing the flow, the emulator will be on the 'waiting for phone' screen.
Stop and start the emulator. It will start with the black screen with 'waiting for phone' message but after 2-3 seconds the emulator screen comes up.
Hope it can resolve your issue too.
I ran into the same issue (stuck on the "Waiting for phone..." screen) and was able to fix it by changing Application Mode to Developer on the Developer Settings screen of Android Auto.
Make sure to restart the head unit server on the phone after that in case it was already running, then reconnect/restart desktop-head-unit.
I ran into similar issues initially and for me the issue was that the "Accept terms" screen of the Android Auto App running on the device that is triggered on connecting to the Emulated HUD was not visible and noticed until I scanned through the recent apps in the Task Switcher.
This is mentioned in step 11 of the Test Android apps for cars - DHU setup instructions here
If this is the first time you are connecting the mobile device to the DHU, check the mobile device's screen to accept the terms of service and adjust permission settings as needed.
So just note that this screen may not be immediately visible to you unless you switch the relevant screen from the Task Switcher.
Try to test your phone on a real car to make sure phone actually works with Android Auto. I have two phones (Huawei p20 and Xiaomi Mi10): xiaomi works fine but p20 doesn't work with multiple settings and/or option neither in car or DHU, however both of them are considered as compatible with Android Auto.
I have created an Android app that runs on a Samsung Galaxy Tab Pro (SM-T900). The main feature of this app is RS232/USB communication using the USB host mode and the USB-to-Serial library.
This app has been working perfectly without the need for any code updates for over a year. However, since the latest Samsung/Android update to Android 5.1, I get a security error and I am no longer able to communicate with USB/RS232 devices. Apart from that, my app runs fine without any crashing. I am simply no longer able to perform USB/RS232 communication.
Here's the logcat:
03-24 17:03:09.015 2798-3149/? D/UsbSettingsManager: requestPermission:/dev/bus/usb/002/008 ,packageName com.example.pumpconnector ,pi PendingIntent{338f59ea: PendingIntentRecord{1fd58866 com.example.pumpconnector broadcastIntent}}
03-24 17:03:09.020 2798-3149/? D/ApplicationPolicy: isUsbDevicePermittedForPackage vendorId: 1027, productId: 24577, package: com.example.pumpconnector
03-24 17:03:09.020 13313-13332/com.example.pumpconnector V/MainActivity: java.lang.SecurityException: Admin does not have android.permission.sec.MDM_APP_MGMT
The app has been configured to start whenever a USB device is attached to the device, which still works on the Samsung tablet. The app works perfectly fine on other (non-Samsung) devices. It's fully functioning on a LG Nexus 5 with Android 6.0.1. installed and also on a Moto G with Android 5.1. A little Google search on the exception quickly points to Samsung specific update/bug that prevent USB communication (check this thread).
I tried to put the following line in the Manifest (without result):
<uses-permission android:name="android.permission.sec.MDM_APP_MGMT"/>
Is there any way to get my app to get the android.permission.sec.MDM_APP_MGMT without having to wait for Samsung to fix it? All help is appreciated.
Check Knox version on device (maybe have been upgraded between) and follow migration guide in knox web site.
Also be sure you'r validating KLM license using KnoxEnterpriseLicenseManager and using EnterpriseLicenseManager For Basic License. Ofc you should check for license in receiver with convenient manager.
I'm creating an android application that interfaces with the texas instruments sensortag. One of the things the app needs to do is be able to change the frequency in which the temperature is reported to the app. I am able to change it through the official TI app which is great, but I cannot seem to get it working in my app.
When viewing the official app (iOS, can't run the android one?), it shows the temperature GATT service, which contains 3 characteristics. When I inspect the characteristics discovered by my app however, it only seems to find two - the data, and the notifications. Not the interval. I have attempted to construct this characteristic myself and write it however it doesn't do anything - no error, no success, just nothing.
The steps I've taken are essentially:
bluetoothGatt.discoverServices();
...
services = bluetoothGatt.getServices();
...
BluetoothGattService service = bluetoothGatt.getService(serviceUUID);
System.out.println("Characteristic = " + service.getCharacteristic(SensorTagGatt.UUID_IRT_PERI));
The output yields null. Is there something obvious I'm missing or that I should be doing that I might not be?
EDIT:
I've installed another app onto the phone written by another developer, and using this to inspect the services and characteristics available shows that it too is unable to find it, so I'm assuming there is something wrong with the android service discovery? The official iOS app is working as expected, and showing all characteristics. Unfortunately, the official android app seems to be incompatible with the version 1.5 firmware and crashes when trying to connect but I assume it too will fail to find the characteristic.
Has anyone else run into this issue and if so been able to get around it?
I developed a custom watch face (Android Wear 5), works perfectly during testing. Uploaded to Google Play and download to test, but it does not show up in the Android Wear app, nor the paired watch itself (running Android Wear 5.0.1)!
I uploaded the mobile apk (similar to my other Android Wear apps), and also have the same permissions for both mobile and wear.
Anybody encountered similar problem? Here's the Watch Face if anybody wanted to test it out: https://play.google.com/store/apps/details?id=com.virtualgs.retrowatch
Are you sure you received an update to your watch face already? You will only see the new watch faces after an update.
If you do have an updated watch, try going to the Android Wear app on your phone, Settings -> Resync apps.
EDIT:
I looked into the logcat of the watch and I saw an attempt to install your watch package:
I/WearablePkgInstaller( 582): Sending install intent to PackageInstaller Intent { act=com.google.android.clockwork.packagemanager.INSTALL_PACKAGE dat=content://com.google.android.clockwork.home.provider/host/com.virtualgs.retrowatch/wearable/com.virtualgs.retrowatch/apk typ=vnd.android.cursor.item/wearable_apk pkg=com.google.android.clockwork.packageinstaller (has extras) }
W/WearablePkgInstaller( 1859): Wearable com.virtualgs.retrowatch has a permission "android.permission.PROVIDE_BACKGROUND" that is not granted in the host application.
You forgot to add PROVIDE_BACKGROUND permission to you phone app (wearable permission set has to be subset of the phone permission set). Remember, that you also need wake lock permission, in case you didn't add it.
EDIT2:
You are declaring wrong permission for providing background. This is the correct one:
com.google.android.permission.PROVIDE_BACKGROUND
I'm working on a project that requires my app to be able to send DTMF tones on the voice's uplink frequency during an active call.
My 2 conditions are:
We don't use a customized Android platform
We don't need to root the phone
I've spent several days doing my homework and am aware that in-call DTMF sending is not supported by the current SDK/standard APIs. However, by using the relevant classes in com.android.internal.telephony I am hoping to mimic how the native Phone app does this. I followed this site on how to use internal APIs for standard 3rd party apps.
I've also set myself up with the Android OS dev environment and am able to run the Phone app in debug mode on an emulator to figure its inner workings.
I tried various ways on a stock standard emulator but the errors I got were:
After trying to install a renamed app based on Phone.apk's source using the sharedUserId of android.uid.phone, I got:
Installation error: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
No doubt due to the fact I don't have the system cert to sign it.
After trying to write a custom app based on the relevant DTMF tone sending code from Phone.apk's source, I get the following error at setting up the PhoneFactory;
java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.provider.Telephony.SPN_STRINGS_UPDATED.
No doubt due to the fact my app doesn't have the right permissions, although AndroidManifest.xml is setup with the same permissions as Phone.apk.
I'm at a loss as to what else I could try. Does anyone have any suggestions?
Thanks in advance,
Simon.
You've taken an interesting approach, and I commend your efforts. Unfortunately, there are some reserved internal privileges (evidently, such as SPN_STRINGS_UPDATED) that you aren't allowed to use as an app developer, which more or less breaks this approach. You could try removing the area of code causing this, but I'm fairly certain you will run into a blocking problem.
Hence, I'm afraid this is not possible at the moment. There's an open feature request on Android for sending DTMF tones over an existing phone call, but it has been dormant there for almost two years.
I understand that this doesn't resolve your problem, but take note that you can send DTMF tones directly after dialing a number:
Intent i = new Intent("android.intent.action.CALL",
Uri.parse("tel://" + number + "," + dtmfTones));
Simply put, you won't be able to do it without customizing at least the Phone app, which has to run as a system user in order to access the modem. In order to do this, you have to root your phone.
To meet your requirements the only possible solution is to enhance the android platform. We did just that, and already sent in our patches to the AOSP project:
https://android-review.googlesource.com/32820
https://android-review.googlesource.com/32821
We are currently waiting for the Google developers to review and accept our contribution. If you are interested, please let Google know on the various AOSP lists (android-contrib, android-platform). It will hopefully expedite the review.
Best Regards,
Gergely
You can't send DTMF tones during an active call, but you can send them when you "program" them when you initiate the call.
see the following post: https://stackoverflow.com/a/12986066/475472