Method for caching network picture on equipment based on Android system
暂无分享,去创建一个
The invention relates to a technology for caching a network picture based on an Android system, aims to solve the problem of low caching speed of network pictures at present, and provides a method for caching the network picture on equipment based on the Android system. The method comprises the following specific steps: setting an occupied maximum cache space value in the memory of the equipment and a caching mechanism in the memory; setting the position of an external storage and the maximum space value of the external storage; acquiring the URL (Uniform Resource Locator) address of the network picture; judging whether the network picture is cached in the memory of the equipment or not; if so, ending a program; otherwise, further judging whether the network picture is cached in external storage equipment or not; if so, reading the network picture from the external storage equipment and storing the network picture in the memory of the equipment; otherwise, downloading the network picture from the Internet according to the URL address of the network picture; after downloading, respectively adding the downloaded network picture into the memory of the equipment and the external storage equipment. The method is suitable for caching network pictures.