Handler for events dispatched from the Launcher view controller.
More...
#import <BlackBerryDynamics/GD/GTLauncherViewController.h>
Launcher state changes and requests made by GTLauncherViewController are handled by creating a class that implements this protocol.
◆ completeAdditionalProcessingBeforeUploadingLogs:
| - (void) completeAdditionalProcessingBeforeUploadingLogs: |
|
(void(^)(void)) |
completionHandler |
|
|
optional |
This method is called before logs start uploading and must call the completion when app is ready for logs to start uploading.
If provided this function must complete before logs start uploading
- Parameters
-
| completionHandler | which must be called to start upload. Failure to do so may hang the UI. |
◆ launcherViewControllerWillOpen:
This method is called when the the app is in an open state and the user manually taps on the Launcher or
with YES as the first parameter is called.
- Parameters
-
◆ launcherViewControllerWillClose:
This method is called when the the app is in a closed state and the user manually taps on the Launcher or
with NO as the first parameter is called.
- Parameters
-
◆ launcherViewController:shouldExecuteOpenHandler:atAddress:
| - (BOOL) launcherViewController: |
|
(GTLauncherViewController *) |
controller |
| shouldExecuteOpenHandler: |
|
(void(^)(void)) |
handler |
| atAddress: |
|
(NSString *) |
address |
|
|
| |
|
optional |
Allows the host application to perform additional work before exiting to an external application. Certain Launcher actions, like selecting another Dynamics app or selecting a create action, requires flipping to another application. However, if the host application needs to perform additional action, such as present an alert, beforebeing sent to the background, the delegate can implement this method, retain a reference to the handler, and return NO. After the host application finishes its respective action, it can then execute the open handler.
If this method is not implemented, the default value is YES and the open handler is executed immediately.
- Parameters
-
| controller | GTLauncherViewController that is requesting to launch an external application. |
| handler | The block of code that, when called, executes the appropriate open behavior. |
| address | NSString representing the address of the application being opened and fronted. Use this value in conjunction with-[ GDiOS getServiceProviders]
to get additional information of the application being opened. |
- Returns
YES if the launcher should perform the open behavior immediately. NO if the host application intends on retaining the open handler and executing it at a later time.
◆ launcherViewController:didRequestGDAuthTokenForServerName:completion:
| - (void) launcherViewController: |
|
(GTLauncherViewController *) |
controller |
| didRequestGDAuthTokenForServerName: |
|
(NSString *) |
name |
| completion: |
|
("This method will be removed in a future release.") |
completion |
|
|
| |
|
optional |
- Deprecated:
- Will be removed in a future release. BlackBerry Dynamics Launcher now handles GDAuthToken management internally.
Provide an authentication token to Launcher.
GDUtility is actually a singleton class with regards to the behavior of its delegate. In other words, there can only be one for an application. Application that provide GTLHostGDAuthTokenManagement as a startup option must implement this delegate method so that Launcher can properly execute its various services.
Because the behavior of retrieving an auth token is asynchronous, a completion handler is provided that must be retained until a token is made available or an error occurs.
When requesting an auth token, nil and the name parameter should be used for the challenge string and server name parameters of
respectively.
- Parameters
-
| controller | GTLauncherViewController that is requesting an auth token. |
| name | NSString of the server name parameter to be provided to GDUtility when requesting an auth token. |
| completion | The block of code to be retained and executed when an GDAuthTokenDelegate method is called. In the event of a sucess, pass the NSString parameter provided in the callback. In the event of an error, pass nil. |
◆ applicationSettingsTableViewControllerForLauncher:
| - (UITableViewController * _Nullable) applicationSettingsTableViewControllerForLauncher: |
|
(GTLauncherViewController *) |
controller |
|
|
optional |
The application settings table view controller to be presented from Launcher. The host application can provide its own settings table view controller that would be displayed upon the user selecting Settings from Launcher, along with Common settings provided by Launcher.
Note that the view controller being presented is not the one being returned but rather an internal context view controller which provides additional functionality to Launcher. The settings view controller is a child view controller of the context view controller and its bounds are set to the bounds of the context view controller. Thus, any setting of the modal presentation or transition style is ignored. Please exclude setting options offered by the Launcher Common settings section in the application table view controller.
If this method is not implemented, the Launcher Common settings view controller will be presented instead.
- Parameters
-
- Returns
- UITableViewController with the settings for the host application. Returning
nil will cause the default behavior of having the Launcher Common settings view controller being displayed.
◆ commonSettingsCellConfigurationForType:launcherViewController:
◆ launcherViewController:viewControllerForLauncherSectionLocation:
| - (UIViewController *) launcherViewController: |
|
(GTLauncherViewController *) |
controller |
| viewControllerForLauncherSectionLocation: |
|
(NSString *) |
location |
|
|
| |
|
optional |
Called when a user selects a Launcher Collection View element provided by the host application. An appropriate view controller for this element should be returned. Use the location parameter to determine what the appropriate view controller should be.
- Parameters
-
| controller | GTLauncherViewController that is requesting a view controller for given location |
| location | NSString id of element selected by user |
◆ launcherViewController:didSelectLocalActionWithLocation:
| - (void) launcherViewController: |
|
(GTLauncherViewController *) |
controller |
| didSelectLocalActionWithLocation: |
|
(NSString *) |
location |
|
|
| |
|
optional |
A local quick action, such as compose email, or an web app (for com.good.gdservice.open-url.http service providers) was selected. Only apps that have associated quick actions need to implement this.
- Parameters
-
| controller | GTLauncherViewController that is requesting a quick action for given location |
| location | NSString id of element selected by user |
The documentation for this protocol was generated from the following file: