I plan new product which could be powered with single use CR123 battery or rechargeable 123 Li-ion battery. These batteries have identical size so there will be one socket for both. This product could be also powered with 12V DC power supply. It is recommended to have internal li-ion charger, that would be perfect to charge the li-ion when the user has 12VDC connected. But what if user places disposable CR123 battery and connects 12V power supply? Single use batteries can't be charged. How to distinguish what battery type is inserted into the socket? Any user selectable options in GUI or any jumpers are not accepted.