Learn more about Dio's CancelToken from the source code
The previous article talked about the use of Dio's CancelToken. This article analyzes how CancelToken can cancel network requests from the source code. Relevant contents are as follows:
Implementation of CancelToken classCancelToken how to cancel a network request
CancelToken class
There is not much code for the CalcelToken class. We can dir ...
Added by char skd1 on Sun, 19 Dec 2021 21:43:45 +0200
service process - keep alive and pull up
Existing problems
Recently, I was working on A project A, which is already A system app, but the App is out of memory and the process will die after the user cleans up the background. In order to ensure that A is always running, A daemon is developed to keep and pull up A. Requirements:
After startup, A cannot start itself to ensure rapid sta ...
Added by zack45668 on Sun, 19 Dec 2021 09:18:12 +0200
In 2020, I will use MVVM in this project
Recently, I saw several articles related to Jetpack MVVM, which made me want to get into this mess. I came into contact with Jetpack's set of development tools in the second half of 2017, and have since taken it as the main framework for development. During this period of use, I stepped on some pits and accumulated some experience. In order to ...
Added by coalgames on Sat, 18 Dec 2021 22:02:42 +0200
Android kotlin Jetpack mvvm project, easy to win offer
Method 1 (new project):
Use the latest Canary version of Android studio, and check Use Kotlin script(.kts) for Gradle build files when creating a new project
Mode 2:
All items in the project will be The gradle file is changed to gradle. KTS, and modify the content syntax to kotlin script syntax (for details, please refer to demo), includin ...
Added by bals28mjk on Sat, 18 Dec 2021 20:45:32 +0200
Interaction of bullet screen, goods and keyboard in Android live broadcast, Android development environment
Realization idea
====
By monitoring the state of the keyboard and the state of the commodity card, the translation y animation is made for the bullet screen area. The implementation idea is very simple. There are some difficulties below
Implementation method of monitoring keyboard state How to get the height of the keyboard
Monitor keybo ...
Added by Prine on Sat, 18 Dec 2021 17:30:39 +0200
Android native development, custom View hand shaking tiktok "Submarine Challenge", interviewer assault question
Attribute Animation: control the movement of obstacles and submarines and various dynamic effects
Stop talking and look at things first! The following describes the implementation of each part of the code.
Background
Bar
First, define the obstacle base class Bar, which is mainly responsible for drawing the bitmap resources to the specified ...
Added by djw821 on Sat, 18 Dec 2021 11:18:09 +0200
Android interview (V) prepare for Android interview
HandlerActivity.runOnUiThread()View.post(Runnable r)
Let's talk about the Handler mechanism
Handler is mainly composed of the following parts.
Handler Handler is a message auxiliary class, which is mainly responsible for sending various message events to the message pool Sendmessage() and the handler that handles the corresponding message e ...
Added by woodsy2k on Sat, 18 Dec 2021 10:49:29 +0200
Android realizes global floating pop-up, and beginners can read it
public WindowManager.LayoutParams wmParams;
public WindowManager getWm() {
return wm;
}
public void setWm(WindowManager wm) {
this.wm = wm;
}
public WindowManager.LayoutParams getWmParams() {
return wmParams;
}
public void setWmParams(WindowManager.LayoutParams wmParams) {
this.wmParams = wmParams;
this. ...
Added by JJ123 on Sat, 18 Dec 2021 01:24:25 +0200
ART virtual machine_ JNI static registration and dynamic registration, deep analysis principle
bool JavaVMExt::IsBadJniVersion(int version) {
// We don't support JNI_VERSION_1_1. These are the only other valid versions.
return version != JNI_VERSION_1_2 && version != JNI_VERSION_1_4 && version != JNI_VERSION_1_6;
}
JNI_Onload function is a treasure place for dynamic registration. We can register in RegisterNatives. T ...
Added by -[ webdreamer ] on Sat, 18 Dec 2021 00:43:31 +0200
AR development summary
1: AR development environment configuration in Unity
1. Android development environment configuration
(1) : create a project, click File build settings, and select the Android platform. If the Android development package is not downloaded, you need to download the Android development package first. You can directly click the link on this pag ...
Added by fire_cracker on Fri, 17 Dec 2021 20:33:44 +0200