This tutorial assumes you are using windows and can run the Universal Windows Version of Geocortex Mobile.
Sometimes, you may have logic or data that needs to be shared by multiple components across an app. In Geocortex Mobile, services are shared singletons that can register global commands and operations, be injected into components, run background tasks, and more.
Check out and setup the Geocortex Mobile SDK Quickstart project.
Create a new file
services/CustomService.cs under the platform agnostic project.
In the file, add a new service class
CustomService and register it with Geocortex Mobile using an assembly attribute.
Custom Services can register custom commands and operations. The following example shows how a custom service can register a command with the
Operations Registry, and how that command can be configured to run on a button press using layout and app config.
- App Config
- User Interface
Check out the relevant Geocortex Mobile SDK Samples:
Learn More About Services
Take a deep dive into services in the Geocortex Mobile SDK
Build a Service that Manages Dynamic Data
Built a service that manages a dynamic data source and exposes it to components