Xi. Android Learning Day-start of project

Source: Internet
Author: User

(Transferred from: http://wenku.baidu.com/view/af39b3164431b90d6c85c72f.html)

Xi. Android Learning Day-start of project

Android Knowledge Point learning is over

From today on a project (MP3 player) to become more familiar with the various points of knowledge learned before ~

A simple MP3 player that should include the following modules:

(i) User interface module

(ii) file download module-Download the MP3 and LRC files.

(c) XML parsing module--is responsible for parsing the song list XML downloaded from the server side.

(d) IO module-Responsible for parsing the LRC file; sdcard read and write functions.

(v) MP3 playback Module--It is important to note that the MP3 playback function should be placed in a service so that MP3 can play normally even when the activity is not visible.

(vi) MP3 playback Settings--is responsible for setting the location of the download file, set character encoding.

A tricky problem has been encountered during programming:

Download function, create new folder in SDcard ... Have carefully checked the code, in the Manifest.xml also add the corresponding permissions, or not ...

The result is that when you create a new virtual machine AVD, the size is not set, and the solution is as follows: Windows---> AvD Manager, delete the existing AVD, then create a new AVD, fill size, general 256Mib is enough. Then run the program on this virtual machine, and the problem can be resolved.

Summarized as follows:

If you encounter such problems, you can check the following:

(i) whether the environment.getexternalstoragedirectory (). GetAbsolutePath () is used in the program to obtain the SDcard card path

(ii) See if SDcard is allowed to be readable and writable in the CMD environment

(iii) whether the appropriate permissions have been added to the manifest.xml

Android.promission.INTERNET

Android.promission.WRITE_EXTERNAL_STORAGE

Android.promission.RIDE_EXTERNAL_STORAGE

(iv) Whether the size of the AVD has a value

Xi. Android Learning Day-project start (GO)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.