HERE iOS SDK Developer's Guide

NMAFleetConnectivityService

Class Summary

class NMAFleetConnectivityService

Derived from: NSObject

Main component of Fleet Connectivity Extension responsible for communication.

Include: NMAKit.framework/headers/NMAFleetConnectivityService.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAFleetConnectivityService

[For complete information, see the section Class Details]

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, writable, assign] NSString *  assetId

Asset ID that identifies this device

[readable, writable, weak] id< NMAFleetConnectivityServiceDelegate delegate

The NMAFleetConnectivityServiceDelegate that listens for messages from the NMAFleetConnectivityService

[readable, writable, assign] NSString *  dispatcherId

Dispatcher ID that identifies the user of this device

[readable, writable, assign] NSUInteger  pollingInterval

Polling interval specified in seconds

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(BOOL) forcePoll

Forces poll of new events, if the service is running

-(NSString *) runningJobId

Retrieves the ID of currently running job

-(BOOL) sendEvent:( NMAFleetConnectivityEvent *) event

Dispatches the provided event

-(BOOL) start

Starts the service if it is not already started

-(BOOL) stop

Stops the service if it is running

Class Method Summary

Table 3. Class Methods
Class Methods

+( NMAFleetConnectivityService *) sharedFleetConnectivityService

Returns the NMAFleetConnectivityService singleton instance

Class Details

Main component of Fleet Connectivity Extension responsible for communication.

Public Property Details

[readable, writable, assign] NSString * assetId

Asset ID that identifies this device. Will be reported in every event dispatched to the server. Server provides new messages based on this ID. Service won't start if it is not specified.

[readable, writable, weak] id< NMAFleetConnectivityServiceDelegatedelegate

The NMAFleetConnectivityServiceDelegate that listens for messages from the NMAFleetConnectivityService.

[readable, writable, assign] NSString * dispatcherId

Dispatcher ID that identifies the user of this device. Service won't start if it is not specified.

[readable, writable, assign] NSUInteger pollingInterval

Polling interval specified in seconds. Default value is 10 seconds. Any attempt to set this property to 0 will be ignored and pollingInterval remains unchanged.

Instance Method Details

-(BOOL) forcePoll

Forces poll of new events, if the service is running.

Returns:

NO if service is not running.

-(NSString *) runningJobId

Retrieves the ID of currently running job. Job is started by sending NMAFleetConnectivityJobStartedEvent. Job can be stopped by sending NMAFleetConnectivityJobFinishedEvent or NMAFleetConnectivityJobCancelledEvent.

Returns:

ID of the currently running job. Nil if no job is in progress.

-(BOOL) sendEvent:( NMAFleetConnectivityEvent *) event

Dispatches the provided event.

Parameters:

  • event

    The NMAFleetConnectivityEvent instance. See NMAFleetConnectivityJobStartedEvent, NMAFleetConnectivityJobFinishedEvent, NMAFleetConnectivityJobRejectedEvent, NMAFleetConnectivityJobCancelledEvent and NMAFleetConnectivityCustomEvent.

Returns:

NO if service is not running or conditions for given event are not met.

-(BOOL) start

Starts the service if it is not already started. Fails if assetId or dispatcherId is not set.

Returns:

NO if assetId or dispatcherId is not set or service is already started.

-(BOOL) stop

Stops the service if it is running.

Returns:

NO if service is not running.

Class Method Details

+( NMAFleetConnectivityService *) sharedFleetConnectivityService

Returns the NMAFleetConnectivityService singleton instance.

Note:

Use this method to obtain a NMAFleetConnectivityService instance. Do not call init directly.

Note:

This method returns a nil object if access to this operation is denied. Contact your HERE representative for more information.

Returns:

shared NMAFleetConnectivityService instance

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.