public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { string documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); // Documents folder string libraryPath = Path.Combine(documentsPath, "..", "Library"); // Library folder instead var path = Path.Combine(libraryPath, ServiceRegistrar.DbFileName); ServiceRegistrar.Initialize(path); return(true); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); var libraryPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); var path = Path.Combine(libraryPath, ServiceRegistrar.DbFileName); ServiceRegistrar.Initialize(path); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); ActionBar.NavigationMode = ActionBarNavigationMode.Tabs; SetContentView(Resource.Layout.Main); _fragments = new Fragment[] { new ShoppingListFragment(), new PastPurchasesFragment(), }; AddTabToActionBar(Resource.String.shopping_list_tab_label); AddTabToActionBar(Resource.String.past_purchases_tab_label); }