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

Wechat web page to obtain user information

To obtain user information through wechat webpage authorization, you only need to configure the authorized domain name on the wechat side, and the subsequent operations are all implemented on the server side. 1. Wechat background configuration authorization domain name 2. Access to user information on the server side Write ...

Posted by snday on Thu, 26 Dec 2019 16:33:44 +0100

Common project dependency summary

Every time I take over a new project, I see a lot of dependencies without comments. Some of them are hard to remember. I have to look up their meanings on the Internet for a long time every time, so I will read them when I write this article for later development to improve the development efficiency. Edited on October 12, 2 ...

Posted by texhead on Mon, 16 Dec 2019 23:17:32 +0100

Okhttp interceptor realizes soft load

problem Okhttp Client needs to access the interface between different server ip. thinking In the interceptor, if the interface service is found to be unavailable, replace the standby ip service address and access the background interface again. Interceptor package com.zyl.interceptor; import okhttp3.Interceptor; import okhttp3.Request; import ...

Posted by NewbieBryan on Sat, 30 Nov 2019 18:15:09 +0100

Self-built Maven Warehouse - Artifactory

Artifactory I. Overview In actual business development, we may encounter many common module management problems. Maybe we don't want to re build corresponding modules every time we pack them, which will liberate our development efficiency to a certain extent. Similarly, because of the existence of walls, sometimes packaging is always a long-t ...

Posted by Joshua F on Mon, 15 Jul 2019 23:10:06 +0200

The token use of OkHttp

Principle analysis The general logic of token is that the login interface obtains a token and refresh_token for refreshing token. In the next token request, all interfaces need to carry the token request so that the server can verify that the source of the request is legitimate. This token is timeliness, the server will give him a timeliness ...

Posted by joking on Thu, 27 Jun 2019 23:58:34 +0200