engine invokes the Oncompletion.oncompletion () callback method provided by the client programmer. Can be set by calling the Mediaplayer.setoncompletionlistener (Oncompletionlistener) method. The internal playback engine once called the Oncompletion.oncompletion () callback method, indicating that the MediaPlayer object entered the playbackcompleted state. 9.3) when in playbackcompleted state, you can call the start () method again to let the MediaPlayer object enter the started state again.
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 arrives. Of course, there is also the song rejection function of the previous version, which uses an acceleration sensor to control the pause
A flash video player is required.
The Flash plug-in can be installed only after Android2.2 and the Flash video can be played in WebView. The initial idea is to set a full-screen WebView for the Activity and then input a Flash Address. Later, I found some problems and made it clear.
1. directly call webView. loadUrl and input the Flash Address. On my custom machine, a white screen is sometimes displayed (no sound or image ).
2. Package the Flash Add
,context.bind_auto_create); You can, of course, start the service in a startservice way, so that when you end the activity, it does not end service}
Private String transfermillitotime (int millis) {dateformat format = new SimpleDateFormat ("Mm:ss");
String result = Format.format (new Date (Millis));
return result; Private class Musicreceiver extends BROADCASTRECEIVER{//3 @Override public void onreceive (context context, Intent Intent) {//TODO auto-generated Method stub if (Intent.getintextr
In the previous article, we introduced the introduction of the app with the ADSL driver.OpenwrtAnd simple configuration. This time, we will summarize the next interesting application, using Android mobile phone +MPDCreates a wireless music player.
Required equipment:
One route entry for db120, rg100a, or other bcm6358 chips
One USB sound card (two sound cards in my hand can work well, one is st
custom UI, the following properties are available: Uvv_fitxy The Universalvideoview property, Boolean value, true when setting video scaling with the width and height of the view settings in the X, y direction, which may distort the video. False when zooming maintains the length-to-width ratio of the video, similar to the Videoview in the SDK. uvv_scalable The Universalmediacontroller property, Boolean value, displays whether the Zoom button at the bottom right of the control bar is displayed,
In the search local video section of Android local video player development, we can search for a local video and display the image, title, and duration of each video, of course, if you need to add other methods such as the Video length and width, you can use the method in the Video class. Since we have obtained the Video, the next step is to decode the Video. I use ffmpeg to decode the Video, so this is the
In the local video section of the Android local video player development, we were able to search for local video and display pictures, titles, and lengths of each video, and of course, if you needed to add other lengths and widths of video, for example, you could use the video class method, and now that we get the videos, So next is decoding the video, decoding the video I'm using FFmpeg, so this is the FFm
Android Video Player series (II)-VideoView and androidvideoview
Recently, I have been learning video-related knowledge. Now I am working step by step. If you have the same requirements, you can follow the steps to facilitate learning.
The previous section mentioned that you can use a system player and a browser to play local and online videos, but this is not eno
Android media server Parsing 1-media player service structure, android1-media
The following is one of the four services registered by media server: structure diagram of MediaPlayerService
1. In the figure, the proxy object BpMediaPlayerService of MediaPlayerService is not found. For this part, refer to the Binder proxy object acquisition.
2. The figure mainly shows the MediaPlayer part of MeidaPlayerServ
The implementation of the idea of a few lines of code can be done, put a button on the interface or with the play icon ImageView, click on the event to call the local player to play.Uri uri = uri.parse ("http://218.200.69.66:8302/upload/Media/20150327/43bfda1b-7280-469c-a83b-82fa311c79d7.m4v"); /Call the system's own player to play streaming video Intent intent = new Intent (Intent.action_view); LOG.V ("uri
[The Music marks for determining the sound level are called music marks. There are three kinds of music marks: G, F, and C )]
--- Basic five-line spectrum tutorial
Jamendo's gesture operation is used to control the playing of a song. There are four gestures corresponding to play, pause, last and next. This article mainly describes how to implement the gesture operation. As for the media player, I will not elaborate on it in subsequent articles.
1.
Android Universal player0.eclipse Direct import can be eaten (pro, there are two library engineering OH) 1. Vitamio-based Universal player (own Baidu Kazakhstan) 2. Scan local video, get the first frame of each video, and display 3. Gesture control volume, brightness 4. The first frame of the captured picture is not processed, may be memory overflow, please handle it yourself 5. Nice drop-down refresh contr
A flash video player is required.
The Flash plug-in can be installed only after android2.2 and the flash video can be played in webview. The initial idea is to set a full-screen webview for the activity and then input a flash Address. Later, I found some problems and made it clear.
1. directly call webview. loadurl and input the flash Address. On my custom machine, a white screen is sometimes displayed (no sound or image ).
2. Package the flash Addres
Synchronize the lyrics of the android mobile music player
I recently learned a lot from a music player on an android phone, such as Fragment and ActionBar. Here I will first introduce the implementation of lyrics synchronization.
The idea of implementing lyrics synchronization is simple: Get the time and the content of
to understand how to get the value. If you do not understand, it's okay, I have an article in Hon Yang is more specific. Recommend to you: http://blog.csdn.net/lmj623565791/article/details/45022631, still waiting for what. Poke it in and take you to fly. 2. Define your own controlsSource code 1:Source Code 2:PS: Two copies of the above self-defined source code. In fact you look carefully. The difference is not very big, changed a place, the change of place, in fact, in our current project encou
If you implement an audio file playback, the simplest way to provide the ability to play audio files in your application is to take advantage of the features of the built-in "music" app-even if you use the system's own or installed music player to play the specified audio file.This example is relatively simple, the following directly gives the source code:Layout file Activity_main:code file Mainactivity: Package Com.mutimediademo3audio;import Java.io
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.