Skip to content

4d/android-sdk

Repository files navigation

SDK

Generate a set of libraries that will be used to build a generated app.

Prerequisites

You can build the SDK with either Windows or macOS operating systems.

To build Android SDK, you should download Android Studio:

  • Android Studio : version requirements in documentation
  • Java 11 is required for latest versions of the sdk. Java 11 is embedded in recent Android Studio versions.

Build

Run ./gradlew clean --refresh-dependencies mavenDependencyExport

And get the libraries in the dependencies/ directory

Alternatively you could use help script build.sh

Deploy

How it work

The SDK used by "4D Mobile App" will be copyed by project from cache folder to the generated mobile app.

By default the Android SDK must be installed into: /Library/Caches/com.4D.mobile/sdk/<version>/Android/sdk

  • with <version>, the 4d version represented as 4 digits (for instance v20=2000 , v20R2=2020)

If no SDK found it will be downloaded from latest release of this project.

Using archive

Instead of the cache you could embeded an archive into your base or the "4D Mobile App" component

💡 Use sdkarchive.sh to archive the sdk. It will zip the content of "dependencies".

Then you could put this "android.zip" archive inside

  • mobile component 4D Mobile App/Resources/sdk/
  • or inside <YourBase>/Resources/mobile/sdk/

SDK frameworks

SDK ones (ie. QMobile)

Name License Usefulness
QMobileAPI 4D Network api
QMobileDataStore 4D Store data
QMobileDataSync 4D Synchronize data
QMobileUI 4D Graphic, Application, Features

3rd parties

Core

Name License Usefulness
Glide Apache 2.0 Image loading
Kotlin Coroutines Apache 2.0 Kotlin coroutines
Jackson Apache 2.0 JSON parser
RxJava Apache 2.0 RxJava bindings
Timber Apache 2.0 Logger

Network/API

Name License Usefulness
Retrofit Apache 2.0 Type-safe HTTP client
OkHttp Apache 2.0 HTTP client

UI

Name License Usefulness
Material Components Apache 2.0 Material Design UI
Insetter Apache 2.0 WindowInsets library
Signature Pad Apache 2.0 Signature pad component
Glide Transformations Apache 2.0 Image transformations

Others

Testing
Name License Usefulness
Mockito MIT Mocking framework
Robolectric MIT Unit testing framework
Dev Tools
Name License Usefulness
Detekt Apache 2.0 Static code analysis
Ktlint MIT Code Coverage
JaCoCo EPL 2.0 Linter/Formatter
Gradle Versions Plugin Apache 2.0 Dependency updates
Project Generator
Name License Usefulness
Clikt Apache 2.0 Command line tool
Kscript MIT Kotlin script library
SQLite JDBC Apache 2.0 Sqlite library