title: Android: Turn On/Off WiFi Hotspot Programmatically on Android Marshmallow (6.0)
body: <p>I have come across this thread (<a href="https://stackoverflow.com/questions/3930990/android-how-to-enable-disable-wifi-or-internet-connection-programmatically">Android: How to Enable/Disable Wifi or Internet Connection Programmatically</a>) which is very similar to what I wanted to ask. I have tried the solution provided by an answer posted by Ashish Sahu (<a href="https://stackoverflow.com/users/1780737/ashish-sahu">https://stackoverflow.com/users/1780737/ashish-sahu</a>) which seems to work perfectly on other Android versions aside from Marshmallow (6.0). </p>
  
  <p>Is there anyway to toggle and setup a WiFi Hotspot on Android Marshmallow? I tried using mHotspot (<a href="http://www.mhotspot.com/" rel="noreferrer">http://www.mhotspot.com/</a>) which can do the job on Android Marshmallow but I just don't know how to implement it.</p>
  
  <p>Thanks in advance.</p>