예제 #1
0
        /// <summary>
        /// Gets the Plot interface. The overload with the Activity parameter is preferred, else you're responsible yourself for asking for Location Services permission.
        /// Calling this method multiple times in your application is no problem.
        /// </summary>
        /// <returns>a link to the Plot interface</returns>
        /// <param name="context">Context</param>
        public static IPlot GetInstance(Android.Content.Context context)
        {
            PlotImplementation instance = (PlotImplementation)GetInstance();

            instance.Init(context);
            return(instance);
        }
예제 #2
0
        /// <summary>
        /// Gets the Plot interface.
        /// Calling this method multiple times in your application is no problem.
        /// </summary>
        /// <returns>a link to the Plot interface</returns>
        /// <param name="activity">an Activity to initialize Plot from</param>
        public static IPlot GetInstance(Android.App.Activity activity)
        {
            PlotImplementation instance = (PlotImplementation)GetInstance();

            instance.Init(activity);
            return(instance);
        }
예제 #3
0
        /// <summary>
        /// Gets the Plot interface.
        /// </summary>
        /// <returns>a link to the Plot interface</returns>
        /// <param name="launchOptions">the launchOptions passed to the delegate</param>
        /// <param name="debug">whether debug logging should be enabled</param>
        public static IPlot GetInstance(Foundation.NSDictionary launchOptions, bool debug)
        {
            PlotImplementation instance = (PlotImplementation)GetInstance();

            instance.Release = !debug;

            if (launchOptions == null)
            {
                launchOptions = new Foundation.NSDictionary();
            }

            Foundation.NSMutableDictionary extendedLaunchOptions = new Foundation.NSMutableDictionary(launchOptions);
            extendedLaunchOptions.Add(new Foundation.NSString("plot-xamarin-version"), new Foundation.NSString(Mono.Runtime.GetDisplayName()));
            instance.InitWithLaunchOptions(extendedLaunchOptions);
            return(instance);
        }
예제 #4
0
        /// <summary>
        /// Mails the debug log. Only works when the debug meta-data property of the PlotService is set to true.
        /// </summary>
        public static void MailDebugLog()
        {
            PlotImplementation instance = (PlotImplementation)GetInstance();

            instance.MailDebugLog();
        }
예제 #5
0
        public static void MailDebugLog(UIKit.UIViewController viewController)
        {
            PlotImplementation instance = (PlotImplementation)GetInstance();

            instance.MailDebugLog(viewController);
        }