博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Android中关于Audio库的知识
阅读量:4056 次
发布时间:2019-05-25

本文共 2002 字,大约阅读时间需要 6 分钟。

Android会自动扫描外存(SD卡)中的文件,获取到audio类型的文件,分析文件后,将信息数据存储在 MediaStore.Audio.AudioColumns表内,该表的结构如下:

字段包括如下:

Constants
The album the audio file is from, if any

Type: TEXT

The id of the album the audio file is from, if any

Type: INTEGER (long)

A non human readable key calculated from the ALBUM, used for searching, sorting and grouping

Type: TEXT

The artist who created the audio file, if any

Type: TEXT

The id of the artist who created the audio file, if any

Type: INTEGER (long)

A non human readable key calculated from the ARTIST, used for searching, sorting and grouping

Type: TEXT

The position, in ms, playback was at when playback for this file was last stopped.
The composer of the audio file, if any

Type: TEXT

The duration of the audio file, in ms

Type: INTEGER (long)

Non-zero if the audio file may be an alarm

Type: INTEGER (boolean)

Non-zero if the audio file is music

Type: INTEGER (boolean)

Non-zero if the audio file may be a notification sound

Type: INTEGER (boolean)

Non-zero if the audio file is a podcast

Type: INTEGER (boolean)

Non-zero if the audio file may be a ringtone

Type: INTEGER (boolean)

A non human readable key calculated from the TITLE, used for searching, sorting and grouping

Type: TEXT

The track number of this song on the album, if any.
The year the audio file was recorded, if any

Type: INTEGER

Inherited Constants
From interface
The count of rows in a directory.
The unique ID for a row.
From interface
The data stream for the file

Type: DATA STREAM

The time the file was added to the media provider Units are seconds since 1970.
The time the file was last modified Units are seconds since 1970.
The display name of the file

Type: TEXT

The MIME type of the file

Type: TEXT

The size of the file in bytes

Type: INTEGER (long)

The title of the content

Type: TEXT

类MediaStore.Audio.Media

描述了手机内和SD卡Audio文件的URI
Fields
public static final The content:// style URI for the "primary" external storage volume.
public static final The content:// style URI for the internal storage.

转载地址:http://bpqci.baihongyu.com/

你可能感兴趣的文章
Java IO
查看>>
Java NIO
查看>>
Java大数据:Hbase分布式存储入门
查看>>
Java大数据:全文搜索引擎Elasticsearch入门
查看>>
大数据学习:Hadoop入门学习书单
查看>>
大数据学习:Spark SQL入门简介
查看>>
大数据学习:Spark RDD操作入门
查看>>
大数据框架:Spark 生态实时流计算
查看>>
大数据入门:Hive和Hbase区别对比
查看>>
大数据入门:ZooKeeper工作原理
查看>>
大数据入门:Zookeeper结构体系
查看>>
大数据入门:Spark RDD基础概念
查看>>
大数据入门:SparkCore开发调优原则
查看>>
大数据入门:Java和Scala编程对比
查看>>
大数据入门:Scala函数式编程
查看>>
大数据入门:大数据数据仓库解析
查看>>
Valid Parentheses
查看>>
Remove Nth Node From End of List
查看>>
Implement strStr()
查看>>
Add Binary
查看>>