Control Bluetooth settings(ON/OFF) through Appium Java code

Can I control real device bluetooth settings)ON/OFF) through java code with Appium?

U can open the preference and navigate to bluetooth.
Also u can get the page source to inspect the elements.