void StartMultipeerAdvertiser() { peer = new MCPeerID("Player1"); session = new MCSession(peer); session.Delegate = sessionDelegate; assistant = new MCAdvertiserAssistant(serviceType, dict, session); assistant.Start(); }
/// <summary> /// Starts the advertiser assistant. /// </summary> /// <param name='displayName'> /// The display name for the local peer /// </param> /// <param name='serviceType'> /// The type of service to advertise. Must be 1-15 characters long, only ASCII lower case characters. /// </param> public static void StartAdvertiserAssistant(string displayName, string serviceType) { _peerId = new MCPeerID(displayName); _session = new MCSession(_peerId); _advertiserAssistant = new MCAdvertiserAssistant(serviceType, null, _session); _advertiserAssistant.Start(); _session.Delegate = SessionDelegate.instance; _advertiserAssistant.Delegate = AdvertiserAssistantDelegate.instance; }
public Task BecomeDiscoverable() { var isWifiEnabled = NetworkInterfaces.IsWifiEnabled(); if (!isWifiEnabled) { throw new WiFiTurnedOffException(); } var myPeerId = new MCPeerID(UIDevice.CurrentDevice.Name); _session = new MCSession(myPeerId) { Delegate = new SessionDelegate(this) }; var assistant = new MCAdvertiserAssistant(BluetoothOperator.CROSSCAM_SERVICE, new NSDictionary(), _session); assistant.Start(); Debug.WriteLine("### DISCOVERABLE START"); return(Task.FromResult(true)); }
void StartMultipeerAdvertiser() { peer = new MCPeerID ("Player1"); session = new MCSession (peer); session.Delegate = sessionDelegate; assistant = new MCAdvertiserAssistant (serviceType, dict, session); assistant.Start (); }
public override void DidDismissInvitation(MCAdvertiserAssistant advertiserAssistant) { MultipeerXT.OnAdvertiserDismissedInvitation(); }
public override void AssitantWillPresentInvitation(MCAdvertiserAssistant advertiserAssistant) { MultipeerXT.OnAdvertiserWillPresentInvitation(); }