App service providers will likely have different actions exposed to the module and app service consumers. It will be difficult to standardize these actions by RPC versions and can easily become stale. Therefore, we introduce a best-effort attempt to take actions on a service.
The PerformAppServiceInteraction
request will be sent to the service that has the matching appServiceId
. The serviceUri
should be the fully qualified URI with all parameters that are necessary for the given action. The URI prefix and actions list will be contained in the app service provider’s manifest. SDL takes no steps to validate an app service provider’s action sheet JSON object. In the future, plug in libraries could be added to handle these sheets on a provider by provider basis.
An app service consumer can also request for this service to become the active service of its respective type. If the app service consumer currently has an HMI state of HMI_FULL this request can be performed without user interaction. If the app is currently not in that state, the HMI should present the user with a choice to allow this app service provider to become the active service of its specified type. If the app service provider is not allowed to become active, the request will not be sent to it and an unsuccessful response will be sent to the requester.
SDL should make no guarantees that:
1. App service providers offer URI prefix and URI Schema
2. App service providers will correctly respond to the requests
3. The requested app service provider will become the active service of that type
4. The serviceUri
will be a correctly formatted URI from the app service consumer
Convenience init for required parameters.
- (nonnull instancetype)initWithServiceUri:(nonnull NSString *)serviceUri
serviceID:(nonnull NSString *)serviceID
originApp:(nonnull NSString *)originApp;
init(serviceUri: String, serviceID: String, originApp: String)
The service URI
The app service ID
The origin app
A SDLPerformAppServiceInteraction object
Convenience init for all parameters.
- (nonnull instancetype)initWithServiceUri:(nonnull NSString *)serviceUri
serviceID:(nonnull NSString *)serviceID
originApp:(nonnull NSString *)originApp
requestServiceActive:(BOOL)requestServiceActive;
init(serviceUri: String, serviceID: String, originApp: String, requestServiceActive: Bool)
The service URI
The app service ID
The origin app
Whether or not the service is active
A SDLPerformAppServiceInteraction object
Fully qualified URI based on a predetermined scheme provided by the app service. SDL makes no guarantee that this URI is correct.
String, Required
@property (nonatomic, strong) NSString *_Nonnull serviceUri;
var serviceUri: String { get set }
The service ID that the app consumer wishes to send this URI.
String, Required
@property (nonatomic, strong) NSString *_Nonnull serviceID;
var serviceID: String { get set }
This string is the appID of the app requesting the app service provider take the specific action.
String, Required
@property (nonatomic, strong) NSString *_Nonnull originApp;
var originApp: String { get set }
This flag signals the requesting consumer would like this service to become the active primary service of the destination’s type.
Boolean, Optional
@property (nonatomic, strong, nullable) NSNumber<SDLBool> *requestServiceActive;
var requestServiceActive: (NSNumber & SDLBool)? { get set }