PerfettoSdkHandshake.LibrarySource


public sealed class PerfettoSdkHandshake.LibrarySource


Provides means to sideload Perfetto SDK native binaries

Summary

Protected constructors

Public methods

static final @NonNull PerfettoSdkHandshake.LibrarySource
aarLibrarySource(
    @NonNull File aarFile,
    @NonNull File tempDirectory,
    @NonNull Function2<@NonNull File, @NonNull FileUnit> moveLibFileFromTmpDirToAppDir
)

Provides means to sideload Perfetto SDK native binaries with a library AAR used as a source

static final @NonNull PerfettoSdkHandshake.LibrarySource
apkLibrarySource(
    @NonNull File apkFile,
    @NonNull File tempDirectory,
    @NonNull Function2<@NonNull File, @NonNull FileUnit> moveLibFileFromTmpDirToAppDir
)

Provides means to sideload Perfetto SDK native binaries with an APK containing the library used as a source

Protected constructors

LibrarySource

protected LibrarySource()

Public methods

aarLibrarySource

Added in 1.0.0
public static final @NonNull PerfettoSdkHandshake.LibrarySource aarLibrarySource(
    @NonNull File aarFile,
    @NonNull File tempDirectory,
    @NonNull Function2<@NonNull File, @NonNull FileUnit> moveLibFileFromTmpDirToAppDir
)

Provides means to sideload Perfetto SDK native binaries with a library AAR used as a source

Parameters
@NonNull File aarFile

an AAR file containing libtracing_perfetto.so

@NonNull File tempDirectory

a directory directly accessible to the caller process (used for extraction of the binaries from the zip)

@NonNull Function2<@NonNull File, @NonNull FileUnit> moveLibFileFromTmpDirToAppDir

a function capable of moving the binary file from the tempDirectory to an app accessible folder

apkLibrarySource

Added in 1.0.0
public static final @NonNull PerfettoSdkHandshake.LibrarySource apkLibrarySource(
    @NonNull File apkFile,
    @NonNull File tempDirectory,
    @NonNull Function2<@NonNull File, @NonNull FileUnit> moveLibFileFromTmpDirToAppDir
)

Provides means to sideload Perfetto SDK native binaries with an APK containing the library used as a source

Parameters
@NonNull File apkFile

an APK file containing libtracing_perfetto.so

@NonNull File tempDirectory

a directory directly accessible to the caller process (used for extraction of the binaries from the zip)

@NonNull Function2<@NonNull File, @NonNull FileUnit> moveLibFileFromTmpDirToAppDir

a function capable of moving the binary file from the tempDirectory to an app accessible folder