3
我需要編寫2個按鈕的處理程序來啓用/禁用wifi和藍牙。現在,我只能看到手機設置頁面,我可以在其中手動更改啓用/禁用wifi和藍牙。那麼,我怎樣才能以編程方式進行呢?以編程方式啓用Wi-Fi和藍牙
代碼爲Wi-Fi:
ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.WiFi;
connectionSettingsTask.Show();