Android Learning Organization _ Service simple application. Music player
1. Because we need to use Service, we need to define it in the AndroidManifest. xml file.
2. Then, put the music to be played in the res/raw folder.3.// Music. java FilePackage com. edgar. playservice;
Import com. edgar. playservice. R;Import com
More and more people are now using their mobile phones to surf the web, and some download sites can access different Web pages, such as iphones and Android, by judging different system phones. Let's look at how to use JavaScript to judge iphone or Android phone accessCode commonly used on the internet/*** [IsMobile judgment Platform]* @param test:0:
Use MediaPlayer to do simple music player, more content please go to Baidu experience view http://jingyan.baidu.com/article/60ccbceb63452364cab197f1.html"http://schemas.android.com/apk/res/android"Xmlns:tools="Http://schemas.android.com/tools"Android:layout_width="match_parent"Android:layout_height="match_parent"android:paddingleft="@dimen/activity_horizontal_margin"Android:paddingright="@dimen/activity_hor
Starting from this article, the implementation of a music player is described in detail, as well as the ability to get the latest recommended songs and download songs from the network parsing data.Features are described below:1. Get the local song list and play the song function.2, using hardware acceleration sensor, shake the phone to achieve the function of switching songs3. Use Jsoup to parse webpage data, get the song list from the network, and re
When creating the interface prototype, if there is a ready-made interface base elements can be used, the designer can quickly complete the prototype production, can save a lot of time and energy. In this article, I share with you 45 sets of very useful UI and Wireframe kit kits to help designers interface prototyping for WEB and Mobile projects.Android 2.2 GUIA complete set of Android 2.2 Mobile Interface UI components material, very beautiful!Big Blo
One time I stumbled upon this warning pop-up style (the iphone client on the left and the Android client on the right), and I was really caught in the flash.
I told visual designers, "Cancel" and "OK" should be different in style (I am a bit helpless, because I think it is common sense), and let him take a serious look at the iphone's native style (pictured below).
Afte
Android Music playerUsing the Actiivity and service components to AndroidPlay Music using service componentsAction buttons, etc. use activity to interact with the userAt the same time, in order to turn the service process into a service process, to prevent the activity from destroying while still executing the service, need to use service-initiated mixed calls, t
Project Online Demo Address: http://rose111.applinzi.com/GitHub Address: Welcome to star Https://github.com/midoxinxin/YueX-Music 悦心,一款音乐播放器应用。由“女立方”团队开发。眼下。较为流行的音乐播放器有QQ音乐、网易云音乐、多米音乐等。“悦心”音乐播放器的主要功能,提供音乐数据库,点击列表播放音乐,还可对歌曲进行收藏。加入专属音乐心情功能。1. During the song playback, the bubbles change dynamically with the music rhythm.2. Click on the disc. Stop music playback3. C
Chapter 2 music and sound effects
The advertisement says "there is no sound, no sound, no matter how good it is". Let's add the sound effect to the program.
In general, the game sounds are divided into two parts: music and sound. The intuitive difference is that the playing time of music is long and the resource file is large. The playback time of sound effects i
One, Baidu online music merry-go-round effect
On the top of that, when the music is playing, the disc wheel is spinning, like a merry-go-round. Feel good to play ah.I happen to think of the former play music player, Ah, this can also be done on the phone's music player, so as to replace the progress bar.The thought,
Http://mzh3344258.blog.51cto.com/1823534/886522
This effect is similar to the switching animation effect of the view in the iPhone. Today, we will only introduce the effects shown above. If you want to see more and more interesting activity switching effects, read the pony article: Sorry !!!
Effect 1:
Result 2:
Effect 3:
Effect 4: (the effect of pony making mistakes ):
Effect 5 (maneuver effect ):
Effect 6 (maneuver effect ):
Okay, after the
This article describes the Android programming development music player, share for everyone to refer to, specifically as follows:
The music player combines the following:
SeekBar, ListView, broadcast receivers (registered in the form of receiver), system services, MediaPlayer
Features to implement:
1. Pause/Play, Next/Previous, click on a song to play2. Suppo
This article introduces the MediaPlayer local music player. When the application is no longer on the frontend and is not using it, we need to establish a Service to ensure that the audio continues to play.
Interaction between Activity and Service binding is the focus of this article (here we need to note that Activity cannot directly access methods in Service objects, so we have introduced it here, this is also a consideration for service security and
Today, the study of the slag to play music with MediaPlayer to join the progress bar, the progress bar is now using the Android Seekbar, later will be followed by the UI, in the past can play music on the basis of, now join the main features are two:1 show playback progress in real time2 Manually adjust the playback progressNow a new project to test the slag, lat
Often see someone ask: "Android version sent out of the picture how so slag!" It's far worse than the iphone! ”。 It's not just that many of the images used in Android are much less than the iphone version, so what's going on?Our team initially struggled with this problem, a half-day effort, around a good big circle, un
This project is an Android-based in-car environment music player, from the UI can be seen professional art design, interface layout and background is very textured user experience is very good, because the project is considering the car environment, so all the functions are mainly using gesture operation. Open the app to enter the four-screen boot interface, the main interface can accept the upper and lower
Use of the Android service:
We can create an Android program that creates an activity in the SRC directory, a service class that inherits from the services class, and creates a raw folder in the Resource folder res directory to store audio files, such as putting Music.mp3 music files in the directory. The main interface of the program is as follows:
XML layout
The player features are as follows:
1. Pause, play2. Drag bar implementation, fast forward, rewind3. Sync Lyrics4. Next song, last one.5. Album Image display6. Background playback, notice bar display7. Call, pause, end of call, start playing.The interface is as follows:
When playing, there will be an icon in the notification bar. Paused, Icon disappears
Background playback, will be displayed in the notification bar, click, you can enter the playback interface
Use details:Download the
This is the optimized version of the previously created music player, because it previously put the control music playing in the activity, this version has already been placed in the Service, in the service to control the playing of music, broadcastreceiver Transmits some data and stops playing music when a call arrive
In recent years, the number of users accessing the Internet through mobile phones has exploded, and with the development of technology and wireless networks, mobile Internet access is switching from a "secret weapon" that only a few people can enjoy to a popular Internet access method that is familiar to the general public. As the number of people accessing the Internet via mobile phones increases, smart phone manufacturers and software developers are all concerned about whether users will use t
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.