Android-Volley-Okttp-Gson Library

Volley is a network library from Android source code. I have integrated gson and okhttp with it.

Лицензия

Лицензия

Категории

Категории

Gson Данные JSON
Группа

Группа

com.himanshuvirmani
Идентификатор

Идентификатор

volley-okhttp-gson-library
Последняя версия

Последняя версия

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

Android-Volley-Okttp-Gson Library
Volley is a network library from Android source code. I have integrated gson and okhttp with it.
Ссылка на сайт

Ссылка на сайт

https://github.com/himanshuvirmani/android-volley-gson-okhttp
Система контроля версий

Система контроля версий

https://github.com/himanshuvirmani/android-volley-gson-okhttp

Скачать volley-okhttp-gson-library

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.himanshuvirmani/volley-okhttp-gson-library/ -->
<dependency>
    <groupId>com.himanshuvirmani</groupId>
    <artifactId>volley-okhttp-gson-library</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.himanshuvirmani/volley-okhttp-gson-library/
implementation 'com.himanshuvirmani:volley-okhttp-gson-library:1.0.2'
// https://jarcasting.com/artifacts/com.himanshuvirmani/volley-okhttp-gson-library/
implementation ("com.himanshuvirmani:volley-okhttp-gson-library:1.0.2")
'com.himanshuvirmani:volley-okhttp-gson-library:jar:1.0.2'
<dependency org="com.himanshuvirmani" name="volley-okhttp-gson-library" rev="1.0.2">
  <artifact name="volley-okhttp-gson-library" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.himanshuvirmani', module='volley-okhttp-gson-library', version='1.0.2')
)
libraryDependencies += "com.himanshuvirmani" % "volley-okhttp-gson-library" % "1.0.2"
[com.himanshuvirmani/volley-okhttp-gson-library "1.0.2"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.google.code.gson : gson jar 2.3
com.squareup.okhttp : okhttp jar 2.3.0

Модули Проекта

Данный проект не имеет модулей.

Android Volley

This is an unofficial mirror for android volley library and is forked from mcxiaoke/android-volley, the source code will synchronize periodically with the official volley repository. Purpose of forking and publishing this library was to give OkHttp and Gson Serialization/Deserialization out of the box. This will reduce down any boilerplate code you would otherwise have to write to embed and use these.

Status

Volley is already published to Maven Central.

  • Maven Central

Usage

for Maven

<dependency>
    <groupId>com.himanshuvirmani</groupId>
    <artifactId>volley-okhttp-gson-library</artifactId>
    <version>1.0.2</version>
</dependency>

for Gradle

repositories {
    mavenCentral()
}
dependencies {
    compile 'com.himanshuvirmani:volley-okhttp-gson-library:1.0.2'
}

### code sample

Create a singleton request queue for network requests via volley.

``` java
RequestQueue mRequestQueue = Volley.newRequestQueue(context.getApplicationContext());

To create a request

public void getPostById(Response.Listener<Post> listener, Response.ErrorListener errorListener,
      int id) {
    mRequestQueue.add(new GetPostsById(listener, errorListener, id));
}

Create a request Class that extends GsonRequest<RequestPayload,ResponsePojo>

public class GetPostsById extends GsonRequest<Void, Post> {

  public GetPostsById(Response.Listener<Post> listener, Response.ErrorListener errorListener,
      int id) {
    super(Method.GET,
        ApiConfig.BASE_URL + ApiConfig.GET_POST_BY_ID.replace("<ID>", String.valueOf(id)), listener,
        errorListener);
  }
}

For complete code sample check Android Base Template Code

Attention

For any Gson or OkHttp issue/suggestions please write back to me at himanshuvirmani@gmail.com or open an issue here. Apart from that this project is just a mirror of volley, if you have found any bugs or need some features, please create an issue at AOSP Issue Tracker.

Версии библиотеки

Версия
1.0.2
1.0.1
1.0.0