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), IconTemplateImageData = maskImage.AsPNG(), // IconMaskImageData = 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) { // Override point for customization after application launch. // If not required for your application you can safely delete this method // Code to start the Xamarin Test Cloud Agent #if ENABLE_TEST_CLOUD Xamarin.Calabash.Start(); #endif // Initialize the call handlers CallManager = new ActiveCallManager(); CallProviderDelegate = new ProviderDelegate(CallManager); return(true); }