public ProviderDelegate(ActiveCallManager callManager) { // Save connection to call manager CallManager = callManager; // Define handle types var handleTypes = new[] { (NSNumber)(int)CXHandleType.PhoneNumber }; // Get Image Mask var maskImage = UIImage.FromFile("telephone_receiver.png"); // Setup the initial configurations //Configuration = new CXProviderConfiguration("MonkeyCall") { // MaximumCallsPerCallGroup = 1, // SupportedHandleTypes = new NSSet<NSNumber>(handleTypes), // IconMaskImageData = maskImage.AsPNG(), // RingtoneSound = "musicloop01.wav" //}; Configuration = new CXProviderConfiguration("MonkeyCall") { MaximumCallsPerCallGroup = 1, SupportedHandleTypes = new NSSet <NSNumber>(handleTypes), //IconTemplateImageData = maskImage.AsPNG(), //RingtoneSound = "musicloop01.wav" }; // Create a new provider Provider = new CXProvider(Configuration); // Attach this delegate Provider.SetDelegate(this, null); }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { // Initialize the call handlers CallManager = new ActiveCallManager(); CallProviderDelegate = new ProviderDelegate(CallManager); return(true); }