- Add this as a submodule to your Git repository with local path 'ionclient'. Folder 'ionclient' must be in the same
directory as your app module. (If your code is not in a Git repository clone this repository into folder '
ionclient'.)
Carefully select a branch:
- develop: Contains the latest version of ION
- develop-old-ion-structure: Older version before breaking API changes, might contain some recent bugfixes
- In settings.gradle:
include ':ionclient'
- In build.gradle of your app module add module dependency
implementation project(':ionclient')
TBD: Make ION client available as a dependency.
The main entry point is the class IonClient
. Create one or multiple instance of IonClient
(the latter can be done by
using the copy
constructor on an already created instance). Try to re-use/share the OkHttpClient
instance to use a
common thread pool for network calls.
IonClient
requires an instance of CollectionProperties
, which contains the essential configuration data.
IonClient.loadImage()
was removed. This call used Picasso
under the hood. Replace these calls with an image loading
library of your choice (e.g. Coil
or Glide
) and configure that library by setting a custom OkHttpClient
instance,
which is best obtained by calling OkHttpClient.withIonFileCache()
.
- Replace
BasicAuth.getAuthHeaderValue(username, password)
withCredentials.basic(username, password)
IonClient.getInstance()
was removed, use the constructor. If multiple instances are created (which is the case for Bayern International) you might want to remember the different instances in your app.- Log level ist set via
IonLog.logLevel
(before:IonConfig.logLevel
) IonConfig
:authorization()
,additionalHeaders()
, andnetworkTimeout()
were removed.- Headers (incl. Authorization Header) must be defined in the
OkHttpClient
instance passed to theIonClient
constructor. - There are okhttp helper classes in the androidkit (module: jvm-core)
- Headers (incl. Authorization Header) must be defined in the
IonConfig
renamed toCollectionProperties