当前位置: 首页 > news >正文

网站日志分析怎么做上海百度推广客服电话

网站日志分析怎么做,上海百度推广客服电话,赤峰城乡建设委员会网站,南阳做网站收费Android教程视频汇总: (1)第一部&#xff1a;8天快速掌握Android视频。 &#xff08;2&#xff09;第二部老罗Android开发视频教程 &#xff08;3&#xff09;《Sundys <Android深入浅出><Android高级应用><Android开发视频教程>》 &#xff08;4&#x…

Android教程视频汇总:

(1)第一部:8天快速掌握Android视频。

(2)第二部老罗Android开发视频教程

(3)《Sundy's <Android深入浅出><Android高级应用><Android开发视频教程>》

(4)《Android开发从零开始》系列课程 

(5)李兴华教你Android开发实战

(6)Mars的Android开发视频教程

(7) 黑马程序员Android4.0视频教程

百度网盘下载地址:http://pan.baidu.com/share/link?shareid=3644771642&uk=2570445786
360云盘下载地址:http://yunpan.cn/QX4vB52TFnfbh


http://url.cn/IEYPzR  

 http://t3.qpic.cn/mblogpic/9088bb506dba8eb45c58/2000 http://t.qq.com/p/t/180962016212776


//MusicControl.java

package com.android.internal.policy.impl;



import java.io.FileDescriptor;
import java.io.FileNotFoundException;
import java.util.Formatter;
import java.util.Locale;
import android.util.Log;
import com.android.internal.R;
import com.android.music.IMediaPlaybackService;    
import android.content.ComponentName;
import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.widget.*;
import android.net.Uri;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import android.provider.MediaStore;
import android.view.View;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;


public class MusicControl implements View.OnClickListener, ServiceConnection{
private View musicControlView;  
private RelativeLayout mMusicWidget;
private ImageButton prevSong;
private ImageButton pauseOrPlay;
private ImageButton nextSong; 
private TextView artistName;
private TextView songName;
private TextView trackName;
private TextView mDate;
private IMediaPlaybackService mService;  
private Context mContext;   
private String TAG = "MusicControl";

private final static int REFRESH = 0;
Handler mHandler = new Handler(){


@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case REFRESH:
try {
if(mService != null){  
artistName.setText(mService.getArtistName());
songName.setText(mService.getTrackName());
trackName.setText(mService.getTrackName());
if(mService.isPlaying()){
pauseOrPlay.setImageResource(R.drawable.iphone_stop);
}else{
pauseOrPlay.setImageResource(R.drawable.iphone_play);


} catch (RemoteException e) {
e.printStackTrace();

mHandler.removeMessages(REFRESH);
    mHandler.sendEmptyMessageDelayed(REFRESH, 1000);
break;


default:
break;
}
}

};

public MusicControl(Context context,View musicView) {
Log.d(TAG, "MusicControl Contruct");
mContext = context;
musicControlView = musicView;  
mContext.bindService(new Intent("com.android.music.MediaPlaybackService"), this, Context.BIND_AUTO_CREATE);
 
prevSong = (ImageButton) musicControlView.findViewById(R.id.musicControlPrevious);
pauseOrPlay = (ImageButton) musicControlView.findViewById(R.id.musicControlPlayOrPause);
nextSong = (ImageButton) musicControlView.findViewById(R.id.musicControlNext); 

artistName = (TextView) musicControlView.findViewById(R.id.artist);
songName = (TextView) musicControlView.findViewById(R.id.song_name);
trackName = (TextView) musicControlView.findViewById(R.id.track_name);

prevSong.setOnClickListener(this);
pauseOrPlay.setOnClickListener(this);
nextSong.setOnClickListener(this); 
}
 
    public void startRefresh(){
    mHandler.removeMessages(REFRESH);
    mHandler.sendEmptyMessage(REFRESH);
    }
    public void stopRefresh(){
    mHandler.removeMessages(REFRESH);
    }
public String getMusicTrack() throws RemoteException{
return mService.getTrackName();
    }
    
@Override
public void onClick(View v) { 
if(v == prevSong){
try {
Log.d(TAG, "MusicControl onClick mService:" + mService);
if(mService != null){
mService.prev();

} catch (RemoteException e) { 
e.printStackTrace();
}
}else if(v == pauseOrPlay){
try {
Log.d(TAG, "MusicControl onClick mService:" + mService);
if(mService != null){
if(mService.isPlaying()){
mService.pause();
pauseOrPlay.setImageResource(R.drawable.iphone_play);
}else{
mService.play();
pauseOrPlay.setImageResource(R.drawable.iphone_stop);
}
}

} catch (RemoteException e) { 
e.printStackTrace();
}
}else if(v == nextSong){
Log.d(TAG, "MusicControl onClick mService:" + mService);
try {
if(mService != null){
mService.next();
}

} catch (RemoteException e) { 
e.printStackTrace();
}



@Override
public void onServiceConnected(ComponentName name, IBinder service) { 
Log.d(TAG, "MusicControl onServiceConnected");
mService = IMediaPlaybackService.Stub.asInterface(service);  
}


@Override
public void onServiceDisconnected(ComponentName arg0) { 
mService = null;
}
 
public boolean isMusicPlay(){
Log.d(TAG, "MusicControl isMusicPlay mService:" + mService);
boolean isPlay = false;
if(mService != null){
try {
isPlay = mService.isPlaying();
} catch (RemoteException e) {
Log.d(TAG, "MusicControl isMusicPlay RemoteException");
isPlay = false;
e.printStackTrace();
}
}
return isPlay;
}
}
http://www.lbrq.cn/news/2691361.html

相关文章:

  • 2023年8月上海疫情爆发企业seo顾问公司
  • 厦门网站设计公司百度推广客服
  • h5可以发在哪些平台上seo研究所
  • wordpress整站生成html免费二级域名分发网站
  • 网站如何合理建设seo软文营销的特点
  • bootstrap wordpress主题seo网站推广的主要目的
  • 大学班级网站建设全国各城市疫情搜索高峰进度
  • ai智能设计logo免费2022最好的百度seo
  • 公司建设网站首页网站如何在百度刷排名
  • wordpress资源博客百度爱采购关键词优化
  • 做网站 多少钱合肥网站优化技术
  • 微博内容放到wordpress徐州seo企业
  • 长沙教育信息网上海高端seo公司
  • 北京营销型网站建站公司青岛seo服务哪家好
  • 如何做网课网站搜索引擎营销的主要方式有
  • 网站界面设计套题辅导班
  • 部门网站建设的意义营销策划方案ppt
  • 新闻网站广州网络营销公司
  • 如何做自己的淘宝网站app推广拉新接单平台
  • 蚌埠建设网站公司北京seo公司有哪些
  • 万网没备案怎么做网站短视频怎么赚钱
  • 网站单页制作教程公司网站建设步骤
  • 专业网站建设品牌百度账号注销
  • 照片在线处理工具网站怎么优化搜索
  • 沈阳网红seo网络推广知识
  • 四川省住房和城乡建设局网站网站建设在线建站
  • 如何用虚拟主机做网站seo排名谁教的好
  • 南宁网站关键字优化爱站工具下载
  • 保定市网站设计怎样给自己的网站做优化
  • web网站开发工作经验培训机构排名一览表
  • 开源日志log4cplus—调用MultiByteToWideChar提示未定义,CP_UTF8未定义定原因有哪些,如何改进?
  • 【GESP】C++一级知识点之【集成开发环境】
  • 获取数组,字符串,集合的长度
  • WireShark:非常好用的网络抓包工具
  • VUE+SPRINGBOOT从0-1打造前后端-前后台系统-会议记录
  • 从裸机到云原生:Linux 操作系统实战进阶的“四维跃迁”