登录
首页 » Java » Android 音乐播放器

Android 音乐播放器

于 2021-06-14 发布
0 112
下载积分: 1 下载次数: 2

代码说明:

Android studio 使用Service及BroadcastReceiver实现音乐播放器

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 基于android的音频通信源码
    主要是java部分,其中引用了一个so库。
    2015-02-17下载
    积分:1
  • 读取SIM卡联系人相关文件的信息,包含EFS文件相对应的人信息,sim卡联系人存储的容量,sim卡联系人的操作等等
    用于调试SIM卡联系人,可以检测sim卡联系人的ADN ,SDN ,FDN 等容量信息,支持读取sim卡联系人到手机,支持高通最新的双卡方案
    2015-06-16下载
    积分:1
  • android 实现后service持续运行,并且唤醒之后进入自定义界面 例子
    安装之后就能不断的唤醒,实现后台service持续运行,并且唤醒之后进入自定义界面
    2014-09-19下载
    积分:1
  • android Pdf Reader pdf阅读器 例子源码下载
    android Pdf Reader pdf阅读器 例子源码下载
    2014-10-30下载
    积分:1
  • 闹钟实现
    闹钟实现
    2021-02-20 10:39:43下载
    积分:1
  • android txt阅读 例子源码
    android txt阅读 例子源码
    2015-04-06下载
    积分:1
  • android高仿美食天下源码
    android高仿美食天下源码
    2015-06-09下载
    积分:1
  • android优化大师 项目完整源代码下载
    仅供大家学习交流使用
    2013-08-28下载
    积分:1
  • android短信功能
    android短信功能 核心代码:package cn.edu.siso;import java.util.ArrayList;import java.util.HashMap;import java.util.Iterator;import java.util.List;import javax.xml.parsers.SAXParserFactory;import org.xml.sax.InputSource;import org.xml.sax.XMLReader;import android.app.ListActivity;import android.content.Intent;import android.os.Bundle;import android.view.KeyEvent;import android.view.View;import android.view.Window;import android.widget.Button;import android.widget.ListView;import android.widget.SimpleAdapter;import cn.edu.ContentProvide.Diary.DiaryColumns;import cn.edu.Info.MyInfo;import cn.edu.MyContentHandler.MyContentHandler;import cn.edu.siso.WareHouselistview.SMSBsharpturn;import cn.edu.siso.WareHouselistview.SMSFriendTab;import cn.edu.siso.WareHouselistview.SMSHavefanTab;import cn.edu.siso.WareHouselistview.SMSLoverTab;import cn.edu.siso.WareHouselistview.SMSSchooljoke;import cn.edu.siso.WareHouselistview.SMSapologize;import cn.edu.siso.WareHouselistview.SMShumorjokes;import cn.edu.siso.WareHouselistview.SMSlovewords;import cn.edu.siso.WareHouselistview.SMSmylove;import cn.edu.siso.WareHouselistview.SMSplayful;public class WareHouseActivity extends ListActivity { /** Called when the activity is first created. */ private List mp3Infos=null; private ListView listview; private Button back,updata; public static final String[] PROJECTION = new String[] { DiaryColumns._ID,DiaryColumns.TITLE, DiaryColumns.CREATED }; private Touch touch=new Touch(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.warehouse); listview=(ListView) findViewById(android.R.id.list); listview.setScrollingCacheEnabled(false); ShowListView(); back=(Button) findViewById(R.id.back); updata=(Button) findViewById(R.id.updata); back.setOnClickListener(new backlistener()); updata.setOnClickListener(new updatalistener()); back.setOnTouchListener(touch); updata.setOnTouchListener(touch); } private SimpleAdapter budildSimpleAdapter(List mp3Infos){ List list=new ArrayList(); for (Iterator iterator = mp3Infos.iterator(); iterator.hasNext();) { MyInfo mp3Info = (MyInfo) iterator.next(); HashMap map=new HashMap(); map.put("name", mp3Info.getName()); map.put("listimageview", R.drawable.image); list.add(map); } SimpleAdapter listadapter=new SimpleAdapter(this, list, R.layout.textview, new String[]{"name","listimageview"}, new int[]{R.id.houseText,R.id.listimageview}); return listadapter ; } private void ShowListView(){ mp3Infos=pares(R.raw.information); SimpleAdapter listadapter= budildSimpleAdapter(mp3Infos); setListAdapter(listadapter); } public List pares(Object xmlname){ List info=new ArrayList(); try { SAXParserFactory factory=SAXParserFactory.newInstance(); XMLReader reader=factory.newSAXParser().getXMLReader(); MyContentHandler mycontenthandler=new MyContentHandler(info); reader.setContentHandler(mycontenthandler); reader.parse(new InputSource(getResources().openRawResource((Integer) xmlname))); } catch (Exception e) { e.printStackTrace(); } return info; } @Override protected void onListItemClick(ListView l, View v, int position, long id) { // TODO Auto-generated method stub //MyInfo myinfo=mp3Infos.get(position); //System.out.println("myinfo-------" myinfo); Intent intent =new Intent(); switch(position){ case 0: intent.setClass(WareHouseActivity.this, SMSapologize.class); startActivity(intent); break; case 1: intent.setClass(WareHouseActivity.this, SMSmylove.class); startActivity(intent); break; case 2: intent.setClass(WareHouseActivity.this, SMSlovewords.class); startActivity(intent); break; case 3: intent.setClass(WareHouseActivity.this, SMSHavefanTab.class); startActivity(intent); break; case 4: intent.setClass(WareHouseActivity.this, SMSLoverTab.class); startActivity(intent); break; case 5: intent.setClass(WareHouseActivity.this, SMSplayful.class); startActivity(intent); break; case 6: intent.setClass(WareHouseActivity.this, SMSBsharpturn.class); startActivity(intent); break; case 7: intent.setClass(WareHouseActivity.this, SMShumorjokes.class); startActivity(intent); break; case 8: intent.setClass(WareHouseActivity.this, SMSFriendTab.class); startActivity(intent); break; case 9: intent.setClass(WareHouseActivity.this, SMSSchooljoke.class); startActivity(intent); break; case 10: intent.setClass(WareHouseActivity.this, SMSSchooljoke.class); startActivity(intent); break; case 11: intent.setClass(WareHouseActivity.this, SMSSchooljoke.class); startActivity(intent); break; case 12: intent.setClass(WareHouseActivity.this, SMSSchooljoke.class); startActivity(intent); break; case 13: intent.setClass(WareHouseActivity.this, SMSSchooljoke.class); startActivity(intent); break; case 14: intent.setClass(WareHouseActivity.this, SMSSchooljoke.class); startActivity(intent); break; case 15: intent.setClass(WareHouseActivity.this, SMSSchooljoke.class); startActivity(intent); break; case 16: intent.setClass(WareHouseActivity.this, SMSSchooljoke.class); startActivity(intent); break; } super.onListItemClick(l, v, position, id); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { // TODO Auto-generated method stub if(keyCode==KeyEvent.KEYCODE_BACK&&event.getRepeatCount()==0){ //需要处理 Intent intent =new Intent(); intent.setClass(WareHouseActivity.this, InformationActivityActivity.class); startActivity(intent); finish(); } return false; } class backlistener implements Button.OnClickListener{ @Override public void onClick(View arg0) { // TODO Auto-generated method stub Intent intent = new Intent(); intent.setClass(WareHouseActivity.this,InformationActivityActivity.class); startActivity(intent); finish(); }} class updatalistener implements Button.OnClickListener{ @Override public void onClick(View v) { ShowListView(); }}}
    2014-11-09下载
    积分:1
  • 《HTML5与CSS3权威指南》范例及代码 下载
    《HTML5与CSS3权威指南》范例及代码,共22章
    2015-01-06下载
    积分:1
  • 696518资源总数
  • 104226会员总数
  • 29今日下载