Twilio Audio switch(Android) - selectDevice() is not properly for bluetooth devices - android

I am working on Android application in which I had integrated Twilio Audio Switch. I would like to connect with Bluetooth device by using selectDevice() method. But, it is not working properly.
Issue: I sense that it is connected and disconnected every seconds and I am unable to make clear communication.
Twilio Versions tried: 1.0.1 , 1.1.12, 1.1.14, 1.1.15
Android OS Version: 9/10/11/12
Please help me find the solution for this.

Related

How to use go-ble to connect from android to linux

I'm trying to implement a BLE connection between two devices:
A Linux app, as the server, that must advertise services and characteristics
An Android smartphone, as the client, that must connect to the server and read characteristics
The issue comes from my Linux app. When I connect my smartphone to my laptop using my android app and bluetoothctl, it works like a charm. However, when I do the same with my Linux app instead of bluetoothctl, it doesn't works (it actually does, but very rarely).
As my Linux app is written in Go, I use go-ble as the bluetooth package. I have the same issue with their minimal code sample, this is the reason I don't write more code here, but I can't figure out why.
I think I just don't know how to use their library correctly, but the documentation isn't very explicit, so if anyone could help...
EDIT
On my smartphone, when using my apps, I see the laptop when scanning, so The HCI device is up. But when attempting to connect with connectGatt(), I get a 133 status code, which is GATT_ERROR.
One probable issue, is I'm not closing the connection, see this thread, but then how could it works with bluetoothctl?
Bluetoothctl is a bluetooth client working either with BLE and BR\EDR bluetooth. It was working because my android app was connecting through "Classic Bluetooth" with gattConnect.
I solved it by specifying the transport protocol to use, replacing:
device.connectGatt(context, false, gattCallback)
with:
device.connectGatt(context, false, gattCallback, BluetoothDevice.TRANSPORT_LE)

Sinch call reconnection Failed after switching mobile network

I am using Sinch SDK for app to app video calling for my android app.
I am facing a problem when I am in a call and I am switching my mobile network (e.g WiFi to 4G or 4G to WiFi) sinch failed to reconnect the call.
Is there any solution for this? I am also tried by changing MediaHandoverConfig like below
MediaHandoverConfig mediaHandoverConfig = new MediaHandoverConfig(10,10000,10000,60000);
Beta.setMediaHandoverConfig(mSinchClient, mediaHandoverConfig);
But still facing the problem.
Thanks in advance.
Please open a request on our support (support#sinch.com) informing your account details and callIds of your test calls, we have network handover as part of our standard test process and it works fine, but there are limitations, specially if the re-connect process takes too much time (>30secs), but that should not be your case, we need to investigate.
Br.
Sinch Voice & Video Team

Connecting to Sphero sprk+ android

I am trying to connect my Android App to Sphero Sprk+ . The Sphero-SDK comes with samples to connect to sphero robot. I have tried that but could not connect to the sprk+. The reason I think is that SPRK+ requires proximity detection profile for Bluetooth LE (4.0 and onwards). Is there a hack or source code that connects to sprk+ ? I tried the Android's Bluetooth LE sample code for the heart rate monitoring profile , and I was able to detect and connect to the SPRK+ . But being a newbie , I still am looking to understand if the sprk+ is a GATT server or GATT client . Sphero lightning Lab connects to sprk+ when it is brought close to the mobile device. So, I understand the code should use proximity detection profile.
UPDATE :
Already figured out the solution. If anyone is looking for a Sample - you can check out the code here - https://github.com/tswapnil/PC-controlled-Sphero/tree/master/app/src/main/java/com/example/swapnil/buttondrive
I was able to connect to a Sprk+ in an Android App using the beta branch of the orbotix/Sphero-Android-SDK repo. I belive the RobotLibrary.jar in that branch has the necessary updates to interface with a BLE device. This would allow you to avoid getting into the internals of how BLE works.

HM10/11 BLE to Android Phone connectivity

First off I would like to ask if it is possibe to send a stream of data from an arduino with HM11 to an android phone via bluetooth.
The data contains ultrasonic sensor's readings, orientation, battery level, etc.
My android phone will be displaying those data accordingly acting as a monitor.
I tried coding already using the android studio using the bluetooth guide resources but i end up unable to connect to my module with a message "read failed, closed or timeout -1". I have tried connecting while paired or unpaired. My app can discover HM11 as well as receive the data using HMBLE Terminal app i have downloaded from Play Store. So I guess the android studio guides are not meant from android to bluetooth modules.
I would also like to begin from scratch as i may have missed out some very important basic information.
Any help?

Setup simple bluetooth server console?

Hi i wanna work with some bluetooth communication using my Android device.
How can i test bluetooth connections easy?
Let say im creating a simple application that will send the message "Hello World" upon connection. I would like some sort of server application console i could fire up on my iMac and have my android application connect to.
The server application should just be a console or something that displays all the data it receives and maybe a input to back a response.
Is there anykind of program that allow this ?
Or do i really need 2x android devices to create a simple server / client interaction with bluetooth?
this Android Bluetooth Chat App will be good starting point .
you can make this connect to the mac over serial port profile.
The example above is for the latest Android versions (it is possible to accomplish this with 1.x versions of android also, you will have to use the appropriate api that are supported in older android versions also)
For Programming in the Mac refer to This

Categories

Resources