public App() { InitializeComponent(); var page = new OnboardingPage(); MainPage = page; }
public GiniVisionLib() { // Create the default network service instance which talks to the Gini API to upload images and pdfs and downloads the extractions giniNetworkService = GiniVisionDefaultNetworkService.InvokeBuilder(Forms.Context) .SetClientCredentials("your-client-id", "your-client-secret", "example-domain.com") .Build(); // Create the default network api instance which allows easy upload of extraction feedback giniNetworkApi = GiniVisionDefaultNetworkApi.InvokeBuilder() .WithGiniVisionDefaultNetworkService(giniNetworkService) .Build(); // Clean up existing instance of the GiniVision singleton if (GiniVision.HasInstance) { GiniVision.Cleanup(Forms.Context); } // You can change the order of the onboarding pages IList <OnboardingPage> onboardingPages = DefaultPagesPhone.AsArrayList(); OnboardingPage page1 = onboardingPages[0]; onboardingPages[0] = onboardingPages[2]; onboardingPages[2] = page1; // Create a GiniVision singleton instance to configure the Gini Vision Library GiniVision.NewInstance() .SetGiniVisionNetworkService(giniNetworkService) .SetGiniVisionNetworkApi(giniNetworkApi) .SetMultiPageEnabled(true) .SetQRCodeScanningEnabled(true) .SetFlashButtonEnabled(true) .SetDocumentImportEnabledFileTypes(DocumentImportEnabledFileTypes.PdfAndImages) .SetShouldShowOnboarding(false) .SetShouldShowOnboardingAtFirstRun(true) .SetCustomOnboardingPages(onboardingPages) .Build(); Android.Util.Log.Debug("gvl", $"starting GVL version: {Net.Gini.Android.Vision.BuildConfig.VersionName}"); }
/** Starts the CovidTracer mobile app. * * Accepts an action that will be called by the app when the * `TracerService` instance shall be started in the platform specific * background-process system (by calling the `Start()` method). * E.g. on Android, the action will call `TracerService.Start()` in a * `Service` process. */ public App(TracerService tracerService_, Action startTracerService) { TracerService = tracerService_; InitializeComponent(); // Opens the onboarding page if it's the first time the app is // opened. Starts the tracer service only if the user went through // the onboarding process, as this will trigger permission requests. if (Preferences.Get(ONBOARDING_DONE_KEY, false)) { StartApp(startTracerService); } else { MainPage = new OnboardingPage(() => { Preferences.Set(ONBOARDING_DONE_KEY, true); StartApp(startTracerService); }); } }