-
public interface EmbraceAndroidApiDeclares the functions that consist of Embrace's public API - specifically those that are only declared on Android. You should not use EmbraceAndroidApi directly or implement it in your own custom classes, as new functions may be added in future. Use the Embrace class instead.
-
-
Method Summary
Modifier and Type Method Description abstract Unitstart(Context context)Starts instrumentation of the Android application using the Embrace SDK. abstract Unitstart(Context context, AppFramework appFramework)Starts instrumentation of the Android application using the Embrace SDK. abstract BooleanstartView(String name)Records that a view 'started'. abstract BooleanendView(String name)Records that a view 'ended'. abstract Unitdisable()If a user wishes to opt-out of exporting data to Embrace, you should:(1) Persist this user preference somewhere that can be readily accessed between processes (2) On the next process launch, read this preference & only initialize the Embrace SDK if you wish to capture data (3) Call this function if the SDK has already been initialized. -
-
Method Detail
-
start
abstract Unit start(Context context)
Starts instrumentation of the Android application using the Embrace SDK. This should be called during creation of the application, as early as possible.
See Embrace Docs for integration instructions. For compatibility with other networking SDKs such as Akamai, the Embrace SDK must be initialized after any other SDK.
- Parameters:
context- an instance of the application context
-
start
abstract Unit start(Context context, AppFramework appFramework)
Starts instrumentation of the Android application using the Embrace SDK. This should be called during creation of the application, as early as possible.
See Embrace Docs for integration instructions. For compatibility with other networking SDKs such as Akamai, the Embrace SDK must be initialized after any other SDK.
- Parameters:
context- an instance of contextappFramework- the AppFramework of the application
-
startView
abstract Boolean startView(String name)
Records that a view 'started'. You should call this when your app starts displaying an activity, a fragment, a screen, or any custom UI element, and you want to capture a breadcrumb that this happens.
A matching call to .endView must be made when the view is no longer displayed.
A maximum of 100 breadcrumbs will be recorded per session, with a maximum length of 256 characters per view name.
- Parameters:
name- the name of the view to log
-
endView
abstract Boolean endView(String name)
Records that a view 'ended'. You should call this when your app stops displaying an activity, a fragment, a screen, or any custom UI element, and you want to capture a breadcrumb that this happens.
A matching call to .startView must be made when the view is first displayed, or no breadcrumb will be logged.
A maximum of 100 breadcrumbs will be recorded per session, with a maximum length of 256 characters per view name.
- Parameters:
name- the name of the view to log
-
disable
abstract Unit disable()
If a user wishes to opt-out of exporting data to Embrace, you should:
(1) Persist this user preference somewhere that can be readily accessed between processes (2) On the next process launch, read this preference & only initialize the Embrace SDK if you wish to capture data (3) Call this function if the SDK has already been initialized.
When the SDK has already been initialized this function will prevent the SDK from exporting any further data via HTTP requests or OTel exports, and will delete any persisted data that has not yet been exported.
The SDK makes a best effort attempt. Some data capture/handlers may remain active until the next process launch due to technical reasons, but any captured data will not be exported.
-
-
-
-