A method for providing a service by a first electronic device, comprising: receiving an advertising request to advertise the service through a virtual access point interface from an application, executing on the first electronic device, that provides the service, wherein the advertising request comprises an indicator for advertising the service through the virtual access point interface; enabling the virtual access point interface in the first electronic device in response to receiving the advertising request to advertise the service from the application; using the virtual access point interface and a discovery protocol to advertise the service, wherein the virtual access point interface enables discovery of the service by a second electronic device, wherein using the virtual access point interface to advertise the service further comprises: receiving a discovery request from the second electronic device through the virtual access point interface, wherein the discovery request comprises one or more service offerings on the second electronic device; and in response to receiving the discovery request from the second electronic device, transmitting a discovery response to the discovery request through the virtual access point interface, wherein the discovery response comprises information that allows the second electronic device to access the service; using the virtual access point interface to establish a wireless peer-to-peer connection between the first electronic device and a second electronic device; providing the service to the second electronic device through the wireless peer-to-peer connection; detecting a termination of advertising for the service, wherein the detecting comprises receiving a request from the application executing on the first electronic device to discontinue advertising the service; and disabling the virtual access point interface based at least in part on the detecting. receiving an advertising request to advertise the service through a virtual access point interface from an application, executing on the first electronic device, that provides the service, wherein the advertising request comprises an indicator for advertising the service through the virtual access point interface; enabling the virtual access point interface in the first electronic device in response to receiving the advertising request to advertise the service from the application; using the virtual access point interface and a discovery protocol to advertise the service, wherein the virtual access point interface enables discovery of the service by a second electronic device, wherein using the virtual access point interface to advertise the service further comprises: receiving a discovery request from the second electronic device through the virtual access point interface, wherein the discovery request comprises one or more service offerings on the second electronic device; and in response to receiving the discovery request from the second electronic device, transmitting a discovery response to the discovery request through the virtual access point interface, wherein the discovery response comprises information that allows the second electronic device to access the service; receiving a discovery request from the second electronic device through the virtual access point interface, wherein the discovery request comprises one or more service offerings on the second electronic device; and in response to receiving the discovery request from the second electronic device, transmitting a discovery response to the discovery request through the virtual access point interface, wherein the discovery response comprises information that allows the second electronic device to access the service; using the virtual access point interface to establish a wireless peer-to-peer connection between the first electronic device and a second electronic device; providing the service to the second electronic device through the wireless peer-to-peer connection; detecting a termination of advertising for the service, wherein the detecting comprises receiving a request from the application executing on the first electronic device to discontinue advertising the service; and disabling the virtual access point interface based at least in part on the detecting.