and orderly pass through the process boundary.
It is tedious to implement this data transmission process through code. Android provides the AIDL tool to handle this task.Select AIDL application scenarios
The official documentation reminds us when to use AIDL is necessary: Only you allow the client to access your service from different applications for inter-process communication, and want to process multithreading in your service.
If you do not need
Android enables online music playingHello, friends, the first blog published by Shanshan in August. Recently, Wu was looking for a job, and when she got sick, she didn't have much energy to write a blog. Today, I am dragging my head to publish an article about the online music effect that has been achieved previously. It is not difficult to play
: layout_width = "wrap_content"Android: layout_height = "wrap_content"Android: text = "@ string/restart"Android: id = "@ + id/btnRestart"/>
The following is the string. xml code of the resource file.
The purpose of this example is to familiarize yourself with the use of audio interfaces and related operations in android
Cover Chart:
Brief introduction
The Wave music is an open source Android online music player.
Play local music and online music
Online music charts, such as hot songs, new songs, etc.
Gao Music's vinyl album cov
This article describes an online music player. The operations are described in detail to achieve the effect and understand the principles of the player.
Source code:
Layout file:
Activity_audio_httpplayer:
AudioHTTPPLayer. java:
Package com. multimediademo7audiohttpplayer; import android. app. activity; import android.
Recently in making an Android phone on the music player, learned a lot of things, such as the use of Fragment,actionbar, and so on, here is the first to introduce the implementation of the lyrics synchronization.
The realization of the lyrics synchronization is simple: Get the time and lyrics in the lyrics file LRC, and then play the corresponding content within the specified time. The difficulty lies in h
This article will guide you to do a music player, in the process of doing this Android development example, can help you to further understand and master the learned ListView and other components. In order to have a better learning effect, many of the features we manually implement, such as the music play fast forward and rewind.
First of all, appreciate the int
The music of a general Android app can be divided into background music and sound effects when you click various controls. The former is generally a relatively large music file, and the latter is generally a relatively small music. In An
resources.Next, if you need to play a music file, you can encapsulate the playback logic by using the player MediaPlayerthat comes with Android: //Start Public voidStart (String path) {Try{mediaplayer.reset (); Mediaplayer.setdatasource (path); Mediaplayer.prepare (); Mediaplayer.start (); Mediautils.currentstate=Constants.play_start; } Catch(IOException e) {e.prints
Android-music player
1. What is Open Core?
Open CoreIt is the core of the Android multimedia framework. It is used for audio, video usage, playback, and other operations on all Android platforms.
2. Specific functions of Open Core
1. multimedia file playback, download, including: 3GPP, MPEG-4, AAC and MP3 containers
MvcplayerI tried to use the MVC pattern on Android to develop a music player.GitHub Address: Https://github.com/skyhacker2/MVCPlayer What is MVCFrom Wikipedia
Controller controllers-responsible for forwarding requests and processing requests.
Views View-Interface designer for graphical interface design.
Model-Programmer to write programs should have the function (implementation algorithm,
, have friends if know for Android, request recommended!Two. Scan local music filesFirst through the QQ music has downloaded the good song.Scan implementation://scan local musicif(Environment.getexternalstoragestate (). Equals (environment.media_mounted)) {NewThread () {@Override Public void Run() {Try{string[] ext = {". mp3"}; File File =NewFile (
The player functions are as follows:
1. Pause and play2. Implement dragging, fast forward, and fast return3. Synchronization of lyrics4. Next song, last song.5. album Image Display6. Background playback. The notification bar is displayed.7. Call, pause, stop, and start playing.The interface is as follows:
During playback, an icon is displayed in the notification bar. Pause, icon disappears
When playing in the background, it will be displayed in the notification bar. Click to go To the playback
Demand analysisUsing the Everyplay (2121-1540 version) recording screen, after upgrading the SDK, encountered a problem, call Android native Mediaplay to play music, when the recording screen can not record to sound, so the solution is to play music files in unity.Probably explain:When you select a song on your phone (other m
mediaplayer (); button = (button) V; try {Switch (v. GETID () {// playback case R. id. btnplay: If (! Mediaplayer. isplaying () {play ();} break; // pause case R. id. btnpause: // if the video is being played, press the button to pause. and the text on the button is displayed as "Pause continue); // set the button text} else {// if it is paused, press the button to continue playing // play ();} break; // stop case R. id. btnstop: If (mediaplayer. isplaying () {mediaplayer. stop ();} break; // r
I recently worked on a screen lock project in my company. I need to display the status of the music player on the screen lock page, similar to the screen lock page of Xiaomi. There are similar functions available on the Internet. Let's make a summary here.
First of all, this data information is sent from the Service (COM. Android. Music. mediaplaybackservice) i
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
suitable for Android, request recommend!
Second, scan local music files
First through the QQ music has been downloading good songs.Scan implementation:
Scan local Music
if (Environment.getexternalstoragestate (). Equals (environment.media_mounted))
{
new Thread ()
{
@Override public
Void Run ()
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.