In practical development, you may encounter other apk s packaged in your own application and installed together. Here are the steps:
First copy the test.apk to the main/assets directory and apply for read and write access to the memory card in the manifest file:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" ...
Posted on Wed, 06 May 2020 12:14:36 -0400 by solon
On Android 7.0 mobile phone, call the system camera with the old method to take photos and keep throwing. FileUriExposedException is abnormal. This is because Android 7.0 forces a policy called StrictMode to be enabled, and App cannot expose URI of file: / /. If you use Intent to open an external App with such a URI (for exampl ...
Posted on Thu, 26 Mar 2020 11:35:22 -0400 by Lexas
Import OkHttp dependency
Posted on Wed, 05 Feb 2020 10:46:03 -0500 by jonybhi
There are two steps to realize automatic program update:
1. Download apk program to local;
2. Install the downloaded apk programFor the implementation of automatic program update server-side operations, please refer to Spring Boot realizes file upload and download
1. Check update service
public class ...
Posted on Sun, 26 Jan 2020 09:15:51 -0500 by gva482
In most of our projects, we will use the function of image or video selection.
Give an example:
Upload the avatar when registering.
Choose a background picture
Photo selection when sending friends
Next, I will introduce the use of a convenient open source library Matisse (below is a personal demo case)
Posted on Sat, 04 Jan 2020 03:03:30 -0500 by okuto1973
Demonstrate the function of the code, call the camera to take photos, and display the photos if successful.
The first step is to define a button for calling the camera to take photos, and ImageView is used to store and display the photos taken.
Posted on Tue, 31 Dec 2019 19:40:28 -0500 by PC Nerd
Android Q is about to launch its official version. This article is based on beta 6, which is close to the final version of Q. It would be better if it would be helpful to the people who read this article.
Private directories of Android Q
The private directory here is the App-specific director ...
Posted on Thu, 03 Oct 2019 17:22:37 -0400 by scarabee
Instead of caching third-party implementations such as Redis, we do some environment variables based on C# to facilitate project use.
1. System Global Variables
Many times, at the beginning of the system operation, the system operation parameters need to be saved for global use.
The code is as follows:
public class ...
Posted on Sun, 22 Sep 2019 12:43:27 -0400 by dipenmistry
A while ago I wrote how to get albums and photos after taking them and display and upload them. This time I made circular images. People who often read my notes will know that I am lazy.Then I'm lazy and self-defined, and the current needs are just as good as the original, the wheel of the Great God, which I'll recommend later.T ...
Posted on Fri, 10 May 2019 13:08:50 -0400 by ifubad
Android N revokes access to files. According to Android N's requirements, to share files between applications, you should send a content://URI and grant temporary access to URI.
The simplest way to do this is to use the FileProvider class.
1. Define FileProvider in manifest
Posted on Tue, 05 Feb 2019 15:15:16 -0500 by barrygar