How to get all audio devices for Android APIs < 23 - webrtc

how can i get all device info not using the method of api 23 ?
AudioDeviceInfo[] devices = audioManager.getDevices(AudioManager.GET_DEVICES_ALL); //or GET_DEVICES_OUTPUTS
is there any way?
In this case the target api is 19 - KitKat.
Thank you.

Related

unpack(): Type H with ZKTeco SDK and Laravel 8

I got This Error when I Try to call getUser():
unpack(): Type H: not enough input, need 1, have 0
I Using Laravel 8 and (ZKTeco SDK) for (fingerprint machine) and Xampp 8.1
Can somebody help me?

ZKTeco device time changes

i'm connecting Zkteco device with my API ,
but in some request my api changes device time, i want to control the time.
this is handshake request [HttpGet]
[Route("iclock/cdata")]
this request returns:
var info = string.Format(#"GET OPTION FROM: BRC7213162133
TransFlag=TransData AttLog OpLog AttPhoto EnrollFP EnrollUser FPImag ChgUser ChgFP FACE UserPic FVEIN BioPhoto
ServerVer=2.4.1
PushProtVer=2.4.1
Encrypt=0
EncryptFlag=1000000000
SupportPing=1
PushOptionsFlag=1
PushOptions=UserCount,TransactionCount,FingerFunOn,FPVersion,FPCount,FaceFunOn,FaceVersion,FaceCount,FvFunOn,FvVersion,FvCount,PvFunOn,PvVersion,PvCount,BioPhotoFun,BioDataFun,PhotoFunOn,~LockFunOn,CardProtFormat,~Platform,MultiBioPhotoSupport,MultiBioDataSupport,MultiBioVersion
MultiBioDataSupport=0:1:1:0:0:0:0:1:1:1
MultiBioPhotoSupport=0:0:0:0:0:0:0:0:0:1
TimeZone = 2
TransTimes=00:00;14:05
TransInterval=1
ErrorDelay=60
Delay=10
Realtime=1
Stamp=1662385210
OpStamp=1662385210
PhotoStamp=0");
return Ok(info);
how could i set zkteco time to my api time?

Movesense CustomGATT and ECG or Accelerometer

There have been a few posts on this issue without any solutions announced.
Wanting to access internal movesense sensor data (ECG, Acc…) but without using the Android or iOS platforms ( as suggested by a movesense presentation https://www.movesense.com/wp-content/uploads/2018/11/2018-11-06-Using-Movesense-CustomGATTService.pdf ), I have failed to do so for at least 1 week.
I can successfully create my own GATT characteristics and subscribe to them from outside the movesense device. This is easily done by augmenting the samples/custom_gattsvc_app with a few lines :
Definition :
const uint16_t myCharUUID16 = 0x2A58; // this new characteristic will appear in the service as the third one in the sample
In CustomGATTSvcClient::configGattSvc() :
WB_RES::GattProperty myCharProp = WB_RES::GattProperty::INDICATE;
myChar.props = wb::MakeArray<WB_RES::GattProperty>( &myCharProp, 1);
myChar.uuid = wb::MakeArray<uint8_t>( reinterpret_cast<const uint8_t*>(&myCharUUID16), 2);
customGattSvc.chars = wb::MakeArray<WB_RES::GattChar>(characteristics, 3); // 3 here since there are 3 characteristics now
Accessing
You can now see and subscribe with a BTLE client (bluetility…) to the new service even if it does not do anything for now.
The problems start here for me :
In CustomGATTSvcClient::onGetResult() I try to force a subscription to ECG or Acc since onGetResult() is called by CustomGATTSvcClient::onPostResult() once all the BT services are created :
int32_t sampleRate = 10;
asyncSubscribe(WB_RES::LOCAL::MEAS_ACC_SAMPLERATE(),AsyncRequestOptions::Empty, sampleRate);
I do not implement onSubscribeResult()
In onNotify() you should be able to intercept the call from the whiteboard with the new data every 1/10 second by
switch (resourceId.getConstId()) {
case WB_RES::LOCAL::MEAS_ACC_SAMPLERATE::ID:
{
// To see a blinking LED on each new Acc data
asyncPut(WB_RES::LOCAL::COMPONENT_LED(),AsyncRequestOptions::Empty, myFlippingBool);
myFlippingBool = ! myFlippingBool;
}
What I have observed :
A. When I asyncSubscribe() the ECG or Acc, the sample’s WB_RES::LOCAL::MEAS_TEMP::LID is no longer called and no updates are dispatched to a BT client even after a successful subscription to the 0x2A1C characteristic. This means that all Notifications are disabled by a resource conflict ?
B. When subscribing ( as before ) or even by :
wb::Result result = getResource("Meas/Acc/10", mMyAccResourceId);
result = asyncSubscribe(mMyAccResourceId);
The onNotify() method is never called as the LED does not blink ( even directly after onNotify() implementation without the switch / case )
There is a lack of documentation on CustomGatt and it seems it blocks many people in integrating the sensor on other platforms ( Raspberry Pi or generic processors running a BT stack ).
I have tried before to access the movesense platform with direct AT commands from a rudimentary microcontroller and a BT module without success (Movesense direct access to GATT endpoints ), so now I’m turning to a Raspberry solution + Qt without success.
Thank you for any example or answers to this question !
At least 10 Hz is not supported. What happens with Meas\Acc\13 ?

Unavailable Camera control API functions, Sony Development SDK, Camera WX500

I am trying to modify the CameraRemoteSampleApp provided by the Sony SDK to add full control over the aperture, iso, and shutter speed to the interface.
At this point however all the relevant functions are off limits.
The documentation defines these functions as "available if the latest version of the PlayMemories Smart Remote Control is installed and in use".
a) The smart remote control is installed and running, with the smartphone connected through it and wifi (Samsung Galaxy SIII).
b) I can take photos with the SDK Sample App.
c) Using the available API list shows that the functions exist but are not available.
d) Calling one of those functions directly returns "Not Available Now". This error code is not present in the documentation.
How can one get access to ISO/F-number/Shutter speed functions in this case?
JSON requests and responses:
Request Methods: {"id":1,"method":"getMethodTypes","version":"1.0","params":[""]}
Response: {"id":1,"results":[["actTakePicture",[],["string*"],"1.0"],["actZoom",["string","string"],["int"],"1.0"],["awaitTakePicture",[],["string*"],"1.0"],["cancelTouchAFPosition",[],[],"1.0"],["getApplicationInfo",[],["string","string"],"1.0"],["getAvailableApiList",[],["string*"],"1.0"],["getAvailableExposureCompensation",[],["int","int","int","int"],"1.0"],["getAvailableExposureMode",[],["string","string*"],"1.0"],["getAvailableFNumber",[],["string","string*"],"1.0"],["getAvailableFlashMode",[],["string","string*"],"1.0"],["getAvailableFocusMode",[],["string","string*"],"1.0"],["getAvailableIsoSpeedRate",[],["string","string*"],"1.0"],["getAvailableLiveviewSize",[],["string","string*"],"1.0"],["getAvailablePostviewImageSize",[],["string","string*"],"1.0"],["getAvailableSelfTimer",[],["int","int*"],"1.0"],["getAvailableShootMode",[],["string","string*"],"1.0"],["getAvailableShutterSpeed",[],["string","string*"],"1.0"],["getAvailableWhiteBalance",[],["{\"whiteBalanceMode\":\"string\", \"colorTemperature\":\"int\"}","{\"whiteBalanceMode\":\"string\", \"colorTemperatureRange\":\"int*\"}*"],"1.0"],["getEvent",["bool"],["{\"type\":\"string\", \"names\":\"string*\"}","{\"type\":\"string\", \"cameraStatus\":\"string\"}","{\"type\":\"string\", \"zoomPosition\":\"int\", \"zoomNumberBox\":\"int\", \"zoomIndexCurrentBox\":\"int\", \"zoomPositionCurrentBox\":\"int\"}","{\"type\":\"string\", \"liveviewStatus\":\"bool\"}","{\"type\":\"string\", \"liveviewOrientation\":\"string\"}","{\"type\":\"string\", \"takePictureUrl\":\"string*\"}*","{\"type\":\"string\", \"continuousError\":\"string\", \"isContinued\":\"bool\"}*","{\"type\":\"string\", \"triggeredError\":\"string*\"}","{\"type\":\"string\", \"sceneRecognition\":\"string\", \"steadyRecognition\":\"string\", \"motionRecognition\":\"string\"}","{\"type\":\"string\", \"formatResult\":\"string\"}","{\"type\":\"string\", \"storageID\":\"string\", \"recordTarget\":\"bool\", \"numberOfRecordableImages\":\"int\", \"recordableTime\":\"int\", \"storageDescription\":\"string\"}*","{\"type\":\"string\", \"currentBeepMode\":\"string\", \"beepModeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentCameraFunction\":\"string\", \"cameraFunctionCandidates\":\"string*\"}","{\"type\":\"string\", \"currentMovieQuality\":\"string\", \"movieQualityCandidates\":\"string*\"}","{\"type\":\"string\", \"checkAvailability\":\"bool\", \"currentAspect\":\"string\", \"currentSize\":\"string\"}","{\"type\":\"string\", \"cameraFunctionResult\":\"string\"}","{\"type\":\"string\", \"currentSteadyMode\":\"string\", \"steadyModeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentViewAngle\":\"int\", \"viewAngleCandidates\":\"int*\"}","{\"type\":\"string\", \"currentExposureMode\":\"string\", \"exposureModeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentPostviewImageSize\":\"string\", \"postviewImageSizeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentSelfTimer\":\"int\", \"selfTimerCandidates\":\"int*\"}","{\"type\":\"string\", \"currentShootMode\":\"string\", \"shootModeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentAELock\":\"bool\", \"aeLockCandidates\":\"bool*\"}","{\"type\":\"string\", \"checkAvailability\":\"bool\", \"currentBracketShootMode\":\"string\", \"currentBracketShootModeOption\":\"string\"}","{\"type\":\"string\", \"checkAvailability\":\"bool\", \"currentCreativeStyle\":\"string\", \"currentCreativeStyleContrast\":\"int\", \"currentCreativeStyleSaturation\":\"int\", \"currentCreativeStyleSharpness\":\"int\"}","{\"type\":\"string\", \"currentExposureCompensation\":\"int\", \"maxExposureCompensation\":\"int\", \"minExposureCompensation\":\"int\", \"stepIndexOfExposureCompensation\":\"int\"}","{\"type\":\"string\", \"currentFlashMode\":\"string\", \"flashModeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentFNumber\":\"string\", \"fNumberCandidates\":\"string*\"}","{\"type\":\"string\", \"currentFocusMode\":\"string\", \"focusModeCandidates\":\"string*\"}","{\"type\":\"string\", \"currentIsoSpeedRate\":\"str
Request Versions: {"id":2,"method":"getVersions","version":"1.0","params":[]}
Response: {"id":2,"result":[["1.0"]]}
Request API: {"id":3,"method":"getAvailableApiList","version":"1.0","params":[]}
Response: {"id":3,"result":[["getVersions","getMethodTypes","getApplicationInfo","getAvailableApiList","getEvent","actTakePicture","stopRecMode","startLiveview","stopLiveview","actZoom","setSelfTimer","getSelfTimer","getAvailableSelfTimer","getSupportedSelfTimer","setExposureCompensation","getExposureCompensation","getAvailableExposureCompensation","getSupportedExposureCompensation","setShootMode","getShootMode","getAvailableShootMode","getSupportedShootMode","getSupportedFlashMode"]]}
Request Flash: {"id":5,"method":"getSupportedFlashMode","version":"1.0","params":[]}
Response Flash: {"id":5,"result":[["off","auto","on","slowSync","rearSync"]]}
Request speed: {"id":5,"method":"getAvailableShutterSpeed","version":"1.0","params":[]}
Response speed: {"id":5,"error":[1,"Not Available Now"]}
There are a couple things that you can check first:
Do you have the latest version of Smart Remote Control installed?
Do you have the latest firmware update for your camera?

using gammu and a DKU2 cable to write a vCard to a nokia 6303i classic

I am trying out gammu for the 1st time because I want to transfer some google contacts back to a nokia 6303i .
While the phone database section in Gammu website states that a number of bluetooth connection settings can be used with this phone, I have no bluetooth connection and will thus have to resort to a DKU2 usb cable that I have. The cable is actually a CA-101 nokia cable but according to gnokii wiki they are technically the same.
I have attempted several different connection types. from the ~/.gammurc
[gammu]
#model = NAUTO
device = 01a5:-1
connection = dku2
synchronizetime = yes
logfile = gammu0.log
logformat = text
use_locking =
gammuloc =
[gammu1]
device = /dev/ttyACM0
connection = at
synchronizetime = yes
logfile = gammu1.log
logformat = text
use_locking =
gammuloc =
[gammu2]
#model = NAUTO
device = /dev/ttyACM0
connection = fbus
synchronizetime = yes
logfile = gammu2.log
logformat = text
use_locking =
gammuloc =
[gammu3]
#model = NAUTO
device = 01a5:-1
connection = fbususb
synchronizetime = yes
logfile = gammu2.log
logformat = text
use_locking =
gammuloc =
I have managed to use the "at" connection with gammu -s 1 identify and correctly read phone info. Then I tried to copy a simple (albeit non gammu generated) vCard from those I exported from google contacts.
It was typically formatted like so:
BEGIN:VCARD
VERSION:2.1
FN:Name Surname
N:Surname;Name
EMAIL;CHARSET=UTF-8;ENCODING=8BIT:name.surname#domain.com
TEL;TYPE=CELL:+10123456789
TEL;TYPE=CELL:+19876543210
END:VCARD
What is frustrating is that from a Windows Pc running nokia PC suite I was able to correctly send that same vCard to the nokia 6303i over the same cable.
However from gammu I have -at most- been able to send the surname from the "N:Surname;Name;;;" field (the contact only shows up with the surname) and the 1st telephone number. So the email and the 2nd phone number have been omitted.
This is not enough for me , because I need all phones, all emails and notes to be transferred. I have not found any information abotu whether the "at" connection supports the "enhancedphonebook" functionality (it appears that it does not), but I apart from "bluefbus" which supposedly supported the "enhancedphonebook" in the "Nokia 6303i Cliassic" I don't know which other cabled connection supports it.
so I have tried
the variations gammu(0) , gammu2 and gammu3 as seen in the config file
but these two do not work.
The gammu and gammu3 dump the following in the log
[Gammu - 1.31.0 built 12:51:10 Jul 24 2016 using GCC 4.7]
[Connection - "dku2"] #or "fbususb for gammu3
[Connection index - 0]
[Model type - ""]
[Device - "01a5:-1"]
[Running on - Linux, kernel 3.2.29-gaze5 (#1 SMP Sat Apr 20 13:57:31 EEST 2013)]
Checking 1d6b:0002 (bus 1, device 1)
Checking 1d6b:0002 (bus 2, device 1)
Checking 1d6b:0001 (bus 3, device 1)
Checking 1d6b:0001 (bus 4, device 1)
Checking 1d6b:0001 (bus 5, device 1)
Checking 1d6b:0001 (bus 6, device 1)
Checking 1d6b:0001 (bus 7, device 1)
Checking 0421:0359 (bus 7, device 35)
Extra CDC subheader: 171
Trying to open device, config=1, c_iface=2, c_alt=0, d_iface=3, d_alt=1
Configuration change not required, unhooking only required interfaces!
Detaching kernel driver from inteface 2
Claiming USB control interface...
Configuring USB control interface...
Claiming USB data interface...
Configuring USB data interface...
Connected!
[Module - "auto"]
Getting model
SENDING frametype 0xD1/length 0x05/5
00 |01 |00 |03 |00 .....
Failed to read from usb (-99)!
Other error
Failed to read from usb (-99)!
Other error
Failed to read from usb (-99)!
Other error
and gammu2
[Gammu - 1.31.0 built 12:51:10 Jul 24 2016 using GCC 4.7]
[Connection - "fbus"]
[Connection index - 0]
[Model type - ""]
[Device - "/dev/ttyACM0"]
[Running on - Linux, kernel 3.2.29-gaze5 (#1 SMP Sat Apr 20 13:57:31 EEST 2013)]
Setting speed to 115200
Serial device: DTR is up, RTS is down, CAR is down, CTS is up
(... and it gets stuck here)
So the main question is: how can I achieve transferring the vCard (and many others) to the phone, over a usb cable???????
Thank you