Tuning Fork extra utilities
Extra utility functions to use Tuning Fork.
Summary
| Functions | |
|---|---|
| TuningFork_findFidelityParamsInApk(JNIEnv *env, jobject context, const char *filename, TuningFork_CProtobufSerialization *fidelity_params) | Load fidelity params from assets/tuningfork/ fpis passed to the caller: call TuningFork_CProtobufSerialization_free to deallocate data stored in the struct. | 
| TuningFork_saveOrDeleteFidelityParamsFile(JNIEnv *env, jobject context, const TuningFork_CProtobufSerialization *fidelity_params) | The TuningFork_init function will save fidelity params to a file for use when a download connection is not available.  | 
| TuningFork_startFidelityParamDownloadThread(const TuningFork_CProtobufSerialization *default_params, TuningFork_FidelityParamsCallback fidelity_params_callback) | Download fidelity parameters on a separate thread.  | 
Functions
TuningFork_findFidelityParamsInApk
TuningFork_ErrorCode TuningFork_findFidelityParamsInApk( JNIEnv *env, jobject context, const char *filename, TuningFork_CProtobufSerialization *fidelity_params )
Load fidelity params from assets/tuningfork/fp is passed to the caller: call TuningFork_CProtobufSerialization_free to deallocate data stored in the struct. 
| Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parameters | 
 | ||||||||
| Returns | TUNINGFORK_ERROR_OK if no error  | 
TuningFork_saveOrDeleteFidelityParamsFile
TuningFork_ErrorCode TuningFork_saveOrDeleteFidelityParamsFile( JNIEnv *env, jobject context, const TuningFork_CProtobufSerialization *fidelity_params )
The TuningFork_init function will save fidelity params to a file for use when a download connection is not available.
With this function, you can replace or delete the saved file.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters | 
 | ||||||
| Returns | TUNINGFORK_ERROR_OK if no error  | 
TuningFork_startFidelityParamDownloadThread
TuningFork_ErrorCode TuningFork_startFidelityParamDownloadThread( const TuningFork_CProtobufSerialization *default_params, TuningFork_FidelityParamsCallback fidelity_params_callback )
Download fidelity parameters on a separate thread.
A download thread is activated to retrieve fidelity params and retries are performed until a download is successful or a timeout occurs. Downloaded params are stored locally and used in preference of default params when the app is started in future. Requests will timeout according to the initial_request_timeout_ms and ultimate_request_timeout_ms fields in the TuningFork_Settings struct with which Tuning Fork was initialized.
| Details | |||||
|---|---|---|---|---|---|
| Parameters | 
 | ||||
| Returns | TUNINGFORK_ERROR_OK if no error  | 
