5

10 Useful Android Library for Every New Developer

 2 years ago
source link: https://dev.to/buddhadebchhetri/10-useful-android-library-for-every-new-developer-4e5n
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

1. Retrofit

Retrofit is type-safe HTTP client that allows you to define your REST API as an interface. You can manipulate the API requests’ body, headers, query parameters, and much more via annotations, which makes everything clean and simple. Retrofit also allows synchronous and asynchronous API calls execution.
java/kotlin

dependencies {
    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
}

2. Glide

Glide is a fast and efficient open source media management and image loading framework for Android that wraps media decoding, memory and disk caching, and resource pooling into a simple and easy to use interface.
java

dependencies {
    implementation 'com.github.bumptech.glide:annotations:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
}

kotlin

dependencies {
    kapt "android.arch.lifecycle:compiler:1.0.0"
    kapt 'com.github.bumptech.glide:compiler:4.9.0'
}

3. Room

Room is an official Android ORM, and there are multiple reasons for that status. This library features a beautiful API that is similar to Retrofit. It also relies heavily on annotations and standard SQL syntax.

Java

dependencies {
    def room_version = "2.1.0-alpha06"

    implementation "androidx.room:room-runtime:$room_version"
    annotationProcessor "androidx.room:room-compiler:$room_version"

    // optional - RxJava support for Room
    implementation "androidx.room:room-rxjava2:$room_version"

    // optional - Guava support for Room, including Optional and ListenableFuture
    implementation "androidx.room:room-guava:$room_version"

    // Test helpers
    testImplementation "androidx.room:room-testing:$room_version"
}

Kotlin

dependencies {
    def room_version = "2.1.0-alpha06"

    implementation "androidx.room:room-runtime:$room_version"
    kapt "androidx.room:room-compiler:$room_version"

    // optional - Kotlin Extensions and Coroutines support for Room
    implementation "androidx.room:room-ktx:$room_version"

    // optional - Guava support for Room, including Optional and ListenableFuture
    implementation "androidx.room:room-guava:$room_version"

    // Test helpers
    testImplementation "androidx.room:room-testing:$room_version"
}

4. Gson

Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object. Gson can work with arbitrary Java objects including pre-existing objects that you do not have source-code of.

Java and Kotlin

dependencies {
    implementation 'com.squareup.retrofit2:converter-moshi:2.5.0'
}

5. Picasso

Picasso is an image library for Android. It's created and maintained by Square, and caters to image loading and processing. It simplifies the process of displaying images from external locations.

java/kotlin

dependencies {
    implementation 'com.squareup.picasso:picasso:2.71828'
}

6. Lottie

Lottie is a library for Android, iOS, Web, and Windows that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile and on the web.
java/Kotlin

dependencies {
    implementation "com.airbnb.android:lottie:2.8.0"
}

7. Dagger

Dagger is a fully static, compile-time dependency injection framework for both Java and Android. It is an adaptation of an earlier version created by Square and now maintained by Google. Dagger aims to address many of the development and performance issues that have plagued reflection-based solutions.

Java

dependencies {
    implementation 'com.google.dagger:dagger-android:2.x'
    implementation 'com.google.dagger:dagger-android-support:2.x' // if you use the support libraries
    annotationProcessor 'com.google.dagger:dagger-android-processor:2.x'
}

Kotlin

dependencies {
    implementation 'com.google.dagger:dagger-android:2.x'
    implementation 'com.google.dagger:dagger-android-support:2.x' // if you use the support libraries
    kapt 'com.google.dagger:dagger-android-processor:2.x'
}

8. RxAndroid

It's one of the most discussed libraries for enabling Reactive Programming in Android development. It's touted as the go-to framework for simplifying concurrency/asynchronous tasks inherent in mobile programming.

Java/Kotlin

dependencies {
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
}

9. Fast Android Networking

Fast Android Networking Library is a powerful library for doing any type of networking in Android applications which is made on top of OkHttp Networking Layer. Fast Android Networking Library takes care of each and everything. So you don't have to do anything, just make request and listen for the response.
java

dependencies {
    implementation 'com.amitshekhar.android:android-networking:1.0.2'
}

10. Slices

Slices display rich content and actions on components, appearing as part of search results in the Google search app. They can display a variety of content types, such as text, images, and actions.
java

dependencies {
    implementation 'androidx.slice:slice-builders:1.0.0-alpha3'
    implementation 'androidx.annotation:annotation:1.0.0-alpha3'
}

Kotlin

dependencies {
    implementation 'androidx.slice:slice-builders-ktx:1.0.0-alpha3'
    implementation 'androidx.annotation:annotation:1.0.0-alpha3'
}

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK