add some beautiful girls to the background, just add background to the layout file. Here we will focus on logic, if you don't talk about these fancy things, how can you switch from the first activity to the second activity? We need to use our powerful Intent. Intent can implement the conversion of one activity to another. When you click a song, the playing interface needs to know that you are playing the magic horse. A series of Song information needs to be passed to the second interface. This
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,
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
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
Android sets a song in the music player as a ringtone, And the setting does not work.AudioProfile, scene mode, multi-card ringtone settingThe system enables Multi_ringtone_support. Choose "Music"> "song list"> "Long-press a song" and choose "set as the ringtone". The message is displayed, but the set scene mode is displayed. The default ringtone is displayed. After a call, the ringtone is also the default r
Oscilloscope is in the university when the teacher taught, but out of work has not been used, and gradually forget, and now learn again. Look at the effect chart:
Here is a custom histogram, and then there is a button, click the button, where the pillars will keep moving, similar to the music player in the oscilloscope beat.
Similar to the previous custom view, rewrite the onsizechange () method and the OnDraw () methodLet's make a list of the va
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.