Package com.zendesk.sdk.network
Interface BaseProvider
-
public interface BaseProvider
Meta provider that should be used in all providers which needMobileSettings
and anAccessToken
.Every provider method that does network operations should call
#configureSdk(ZendeskCallback)
before.#configureSdk(ZendeskCallback)
will return aSdkConfiguration
what contains anAccessToken
andMobileSettings
.
The implementation ofBaseProvider
manages loading ofMobileSettings
and anAccessToken
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
configureSdk(<any> callback)
Loads all configurations that are needed by the SDK to to network requests.void
getAccessToken(SafeMobileSettings mobileSettings, <any> callback)
Retrieve an instance ofAccessToken
.void
getSdkSettings(<any> callback)
Retrieve an instance ofMobileSettings
.
-
-
-
Method Detail
-
configureSdk
void configureSdk(<any> callback)
Loads all configurations that are needed by the SDK to to network requests.- Parameters:
callback
- A callback that will return aSdkConfiguration
or anErrorResponse
-
getSdkSettings
void getSdkSettings(<any> callback)
Retrieve an instance ofMobileSettings
. This method decides whether the settings should be loaded from the network or from local storage.- Parameters:
callback
- AZendeskCallback
that returnsMobileSettings
or anErrorResponse
-
getAccessToken
void getAccessToken(SafeMobileSettings mobileSettings, <any> callback)
Retrieve an instance ofAccessToken
. The method decides whether the settings should be loaded from the network or from local storage.- Parameters:
mobileSettings
- ValidMobileSettings
callback
- AZendeskCallback
that returnsAccessToken
or anErrorResponse
-
-