Android implements request HTTP authentication

These days, the development of external SDK, can achieve landing, payment.Similar to developing a set of QQ, WeChat third party login.The authorization protocol used is OAuth 2.0.Among them, Http Authentication is used, and you can consult the online materials. There are all kinds of answers, some don't know if they have been verified, and some ...

Posted by bradleybebad on Fri, 10 Jul 2020 16:54:06 +0200

OKHttp quick start

OKHttp quick start OKHttp quick start Synchronization request get Asynchronous request get post Set request header Download File encapsulation Interceptor Application interceptor Network connector OKHttp quick start Official website: https://square.github.io/okhttp/ Code warehouse: https:/ ...

Posted by Lodius2000 on Mon, 22 Jun 2020 09:31:27 +0200

Qiniu cloud image upload, configure secondary domain name, support https.

Write in front There are not a few articles about qiniu cloud uploading pictures, but they just use the test domain name given by qiniu cloud. As a webmaster, after upgrading his domain name to https, the obsessive-compulsive patients are not allowed to have the three words of insecurity in the brow ...

Posted by Salis on Wed, 17 Jun 2020 08:52:21 +0200

Simple combination of Retrofit and OkHttp

In our request network, there are many kinds of network request modes, so two kinds of network request modes, Retrofit and OkHttp, can be used together. Both Retrofit and OkHttp are released by Square company. The bottom layer of Retrofit encapsulates OkHttp. I use MVP mode here to encapsulate a network request~~ Custom tool class public cla ...

Posted by jbulaswad on Sun, 31 May 2020 19:11:27 +0200

Self made certificate of Android HTTPS realizes bidirectional authentication (OkHttp + Retrofit + Rxjava)

Due to a high security project to be done recently, it needs to use HTTPS for two-way authentication. When designing the project architecture, the client uses MVVM architecture, and realizes Android based on DataBinding + Retrofit + Rxjava. Looking up a lot of data, there are many examples of implementing two-way authentication based on native ...

Posted by okyejr on Thu, 21 May 2020 06:36:59 +0200

Understanding of intelligent agriculture project

1, Implementation of UI interface This is not difficult, because the teacher gave us the renderings in advance, but one of the more complex points is to realize the image sliding, that is to use a Viewpager in the fragment to realize the image sliding. 2, Set ip address: The code is as follows public static Stri ...

Posted by 303tech on Tue, 31 Mar 2020 17:48:46 +0200

Android Banner+Glide realizes offline loading of carousel chart and data cache

First of all, add the following dependencies to build.gradle in app, banner is the frame of carousel chart, glide is the frame of picture loading. implementation 'com.youth.banner:banner:1.4.9' implementation 'com.github.bumptech.glide:glide:4.7.1' annotationProcessor 'com.github.bumptech.glide:compiler ...

Posted by cyber_ghost on Sat, 08 Feb 2020 13:20:36 +0100

Android network framework OKHttp

Summary OKhttp is an open source project of network request. Android network request lightweight framework supports file upload and download, https, and contributed by mobile payment Square company. rely on compile 'com.squareup.okhttp3:okhttp:3.8.1' Get request Send synchronization request by Get OkHttpClient okHttpClient; Request ...

Posted by johnthedeveloper on Fri, 03 Jan 2020 21:29:32 +0100

Solve the problem of using Okhttp+Retrofit to send network request and get json is unicode

When we use Okhttp and Retrofit to send network requests, the man in the json we get is unicode code, as shown in the figure below At this time, we need to set the network editor when Okhttp is initialized, and change the return value code to UTF-8 OKhttp previously set HttpLoggingInterceptor logging = new HttpLogg ...

Posted by davidb on Fri, 03 Jan 2020 01:59:46 +0100

android network 3 okhttp (1) get / Post basic usage

Okhttp is a very excellent network framework, with the characteristics of searching on the network, so we will not go over it again. This article will see how to use okhttp The download address of okhttp source code is: https://github.com/square/okhttp Sample download address of this article: https://github.com/cmyeyi/NetFram ...

Posted by magicdanw on Wed, 01 Jan 2020 08:35:45 +0100