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 .NET with custom changes, open the Microsoft.iOS
Launcher Bindings library project GoodDynamics.iOS.Launcher
and check the reference to the Launcher library from the local framework path. You can find it under Native References
in the Solution Explorer.- Download theBlackBerry Dynamics LauncherBindings for .NET software from BlackBerry Developer Downloads.
- In your IDE, load the NuGet binding packages into the desired projects. For each project, right-clickDependenciesand clickManage NuGet Packages...to reference the Launcher binding. For more information, see Configure a new or existing BlackBerry Dynamics app to use the dynamic framework.
- 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.InternalGDAuthTokenAndPushConnectionManagement); Window.MakeKeyAndVisible(); break; default: Debug.Assert (false, "Authorized startup with an error"); break; } } ...