I am trying to find out what kind of ear jack device supports . I mean 3.5 mm or type C or USB etc.
I got some code which detect what kind of headset is plugged , but I want to check ear jack type without plugging earphones into device.
I am trying to find out what kind of ear jack device supports . I mean 3.5 mm or type C or USB etc.
I got some code which detect what kind of headset is plugged , but I want to check ear jack type without plugging earphones into device.
This is something which you should figure out by yourself. As a developer (in theory) you should not care what the hardware is, but what features it supports. This is the case with the headset- you're most likely able to detect some vendor string of the headset.
Here's some workaround you could try to guess the jack type: - You should be able to extract device info. Something like in here: Get Android Phone Model programmatically - Then keep a list of the device -> jack port to "extract" that information.
Keep in mind this would be a tedious work and won't be able to detect jacks in 100%.
If you provide more context on why do you need exactly the kind of port, someone might give a better suggestion.