public override void OnCreate()
        {
            base.OnCreate();

            Rock.Mobile.PlatformSpecific.Android.Core.Context = this;

#if !DEBUG
            LocalyticsActivityLifecycleCallbacks callback = new LocalyticsActivityLifecycleCallbacks( this );
            RegisterActivityLifecycleCallbacks( callback );
#endif
        }
Exemple #2
0
        protected override void OnCreate( Bundle bundle )
        {
            base.OnCreate( bundle );

            #if !DEBUG
            LocalyticsActivityLifecycleCallbacks callback = new LocalyticsActivityLifecycleCallbacks( this );
            Application.RegisterActivityLifecycleCallbacks( callback );
            #endif

            Window.AddFlags(WindowManagerFlags.Fullscreen);

            Rock.Mobile.PlatformSpecific.Android.Core.Context = this;

            // default our app to protrait mode, and let the notes change it.
            if ( SupportsLandscapeWide( ) )
            {
                RequestedOrientation = Android.Content.PM.ScreenOrientation.FullSensor;
            }
            else
            {
                RequestedOrientation = Android.Content.PM.ScreenOrientation.Portrait;
            }

            DisplayMetrics metrics = Resources.DisplayMetrics;
            Rock.Mobile.Util.Debug.WriteLine( string.Format( "Android Device detected dpi: {0}", metrics.DensityDpi ) );

            // Set our view from the "main" layout resource
            SetContentView( Resource.Layout.Main );

            // get the active task frame and give it to the springboard
            FrameLayout layout = FindViewById<FrameLayout>(Resource.Id.activetask);

            Rock.Mobile.UI.PlatformBaseUI.Init( );
            MapsInitializer.Initialize( this );

            Springboard = FragmentManager.FindFragmentById(Resource.Id.springboard) as Springboard;
            Springboard.SetActiveTaskFrame( layout );
        }