Implement the BlackBerry Dynamics Launcher
BlackBerry Dynamics Launcher
You have the option to implement the
BlackBerry Dynamics Launcher
, an intuitive front-end UI that makes it easy for device users to access and modify settings for BlackBerry
Dynamics
apps. For more information, see the documentation for the BlackBerry Dynamics Launcher Framework.To implement the
BlackBerry Dynamics Launcher
, you add the BlackBerry Dynamics Launcher
button to an activity and include its authentication logic in the appropriate place in your app.If you want to create your own version of the
BlackBerry
Dynamics
Bindings for Xamarin
with custom changes, open the Xamarin
Launcher Bindings library project GoodDynamics.iOS.Launcher
and check the reference to the Launcher library from the local framework path (for example, on Mac
the default location is Frameworks/BlackBerryLauncher.xcframework). You can find it under Native References
in the Solution Explorer.- Download theBlackBerry Dynamics Launchersoftware from BlackBerry Developer Downloads.
- In your IDE, load the bindings into the desired projects. For each project, right-clickReferencesand clickEdit Referencesto reference the Launcher binding. Ensure that the GoodDynamics.iOS.Launcher.resources directory is located on the same level as GoodDynamics.iOS.Launcher.dll.
- Add theBlackBerry Dynamics Launcherbutton and initialize it with the following lines in theOnAuthorizedmethod of yourAppDelegate:. . . var launcher = new GoodDynamics.iOS.Launcher.GTLauncherViewController(root); Window.RootViewController = launcher; launcher.StartServicesWithOptions (GoodDynamics.iOS.Launcher.GTLauncherServicesStartupOptions.InternalGDAuthToken AndPushConnectionManagement); ...
Here is a complete example of
OnAuthorized
with the BlackBerry Dynamics Launcher
code in the case
statement: ... private void OnAuthorized(GDAppEvent anEvent) { switch (anEvent.Code) { case GDAppResultCode.ErrorNone: UINavigationBar.Appearance.TintColor = UIColor.FromRGBA(52f / 255f, 69f / 255f, 84f / 255f, 1); UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes() { TextColor = UIColor.FromRGBA(33f / 255f, 50f / 255f, 65f / 255f, 1) }); var root = new UINavigationController(new ProductsView()); var launcher = new GoodDynamics.iOS.Launcher.GTLauncherViewController(root); Window.RootViewController = launcher; launcher.StartServicesWithOptions (GoodDynamics.iOS.Launcher.GTLauncherServicesStartupOptions.InternalGDAuthTokenAnd PushConnectionManagement); Window.MakeKeyAndVisible(); break; default: Debug.Assert (false, "Authorized startup with an error"); break; } } ...