Discover how to add music to android, include the articles, news, trends, analysis and practical advice about how to add music to android on alibabacloud.com
Com. Android. providers. Media/databases under data/is divided into two parts:
External-cfe1d0f.db // external data mainly from SDIn cardData
Internal. DB // mainly system data, such as system ringtones
Among them, the table above is related to music, and the table behind vdiao is also related to gallery. Today, my research is about music.
Album_art audio s
An example of this article describes the way Android programming gets sdcard music files. Share to everyone for your reference, specific as follows:
Copy Code code as follows:
Cursor query (Uri uri, string[] projection, string selection, string[] Selectionargs, string sortOrder);
Uri: Indicates the name of the database to query, plus the name of the table, from Mediastore we can find th
With two days of free time, research has written a class Win8-style Android music player that implements most of the basic functions. Here's a look at the specific description:Basic implementation Features:Note: Android system version must be above 2.2, to ensure that the phone installed SD card (some icons to QQ music
Disclaimer: The book "Secrets of Android Application Development", which records the logs of the book, references the relevant code and summary, and has no commercial use, it is completely a record of self-learning, and many problems will inevitably occur in learning just now. If there are any mistakes, please criticize them a lot.
Today, I started to learn about multimedia operations, because part of our smart phones play an important role in audio,
The code for updating the playback time and progress bar of the music player in Android is in the packages/audio music/mediaplaybackactivity. Java file.
Source code reference: http://www.oschina.net/code/explore/android-2.2-froyo/com/android/
When you need to create a program running in the background, you need to use the service. Service can be divided into two types: infinite life and limited life. Note that the service and activities are different (in simple terms, it can be understood as the difference between the background and the foreground). For example, ifIf you need to use service, you need to call startservice () and then use startservice () to call the oncreate () and onstart () methods in service to start a backend servi
implementation of the class Eraseview, the following look at the code of this class:First we need to define a canvas and a brush
12345678910
paint =newPaint();paint.setStyle(Paint.Style.STROKE);paint.setXfermode(newPorterDuffXfermode(Mode.CLEAR));paint.setAntiAlias(true);paint.setDither(true);paint.setStrokeJoin(Paint.Join.ROUND);paint.setStrokeCap(Paint.Cap.ROUND);paint.setStrokeWidth(30);mCanvas =newCanvas(bitmap);
When your finger touches the screen, you need to trig
Android Media (recording, playing music, playing video, etc)
/*** Recording ** @ param incomingNumber */public void startRecorder (String incomingNumber) {// 1. create a recorder instance recorder = new MediaRecorder (); // 2. set the path of the data source (VOICE_CALL simulator and foreign mobile phones do not support) recorder. setAudioSource (MediaRecorder. audioSource. MIC); // 3. set the output file f
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
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
In a music player, the playback mode is generally automatically recognized after the music is played. The following logic code is provided. You can add the appropriate code as needed.
Public static final int ALL = 0; // ALL Loops
Public static final int SINGLE = 1; // SINGLE Loop
Public static final int RANDOM = 2; // RANDOM
// After playing a song (set the playi
In the music player, the playback mode is usually placed in the music after the automatic recognition, the following gives the logical code, you can add appropriate code as needed
public static final int all = 0;//full loop
public static final int singles = 1;//single loop
public static final int RANDOM = 2;//random
After a song is finished (set playback mode
In the music player, the playback mode is usually placed in the music after the automatic recognition, the following gives the logical code, you can add appropriate code as needed
public static final int all = 0;//full loop public
static final int single = 1;//singles loop public
static final int RANDOM = 2;//random
//A song after playback is compl
First, we read the file from the SD card to play the file !!
1 ,:
Work in advance and put music files into the SD card,
2. layout file main. xml
3. Activity
Package CN. csdn. activity; import Java. io. file; import Java. io. ioexception; import Java. util. timer; import Java. util. timertask; import android. app. activity; import android. media. mediaplayer;
The previous article wrote about using MediaPlayer to play music, http://blog.csdn.net/huweigoodboy/article/details/39861539, now to load the local lyrics. OK, still use that picture. one, match lyrics from memory cardwill be matched from the following path1) sweetmusicplayer/lyrics/2) songs in the same sibling directory3) Song parent directory/lryics (Lryic Plus s, first letter size or not)LrccontentPackage Com.huwei.sweetmusicplayer.models;public c
jquery ajaxandroid Development Android layoutjqueryphp
Want to askI want to do a kind of like a lot of apps the first time the download will appear four to five of their own app introduction (full screen) of the same typeBut I want to be self-running (users can choose to "pause" or "ignore")
But the point is, "I can insert music," and the user doesn't get off the
When you are bored by bus, when you drown in the subway crowd, do you want to keep a quiet in your heart, then please bring headphones, open your music player, listen to an old song to take you into the quiet world, music play this function before the advent of smartphones, the Nokia era, Even when it comes back to the start of the mobile phone, it belongs to the audio category. One of the unavoidable uses
,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
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.