資源簡介
Android AIDL音樂播放器,適合初學者,實現了四種播放模式,上一曲,下一曲,新手可以學習一下
代碼片段和文件信息
/*
?*?This?file?is?auto-generated.??DO?NOT?MODIFY.
?*?Original?file:?E:\\Users\\Administrator\\workspace\\AIDLTest\\src\\com\\example\\AIDL\\Music.aidl
?*/
package?com.example.AIDL;
public?interface?Music?extends?android.os.IInterface
{
/**?Local-side?IPC?implementation?stub?class.?*/
public?static?abstract?class?Stub?extends?android.os.Binder?implements?com.example.AIDL.Music
{
private?static?final?java.lang.String?DEscriptOR?=?“com.example.AIDL.Music“;
/**?Construct?the?stub?at?attach?it?to?the?interface.?*/
public?Stub()
{
this.attachInterface(this?DEscriptOR);
}
/**
?*?Cast?an?IBinder?object?into?an?com.example.AIDL.Music?interface
?*?generating?a?proxy?if?needed.
?*/
public?static?com.example.AIDL.Music?asInterface(android.os.IBinder?obj)
{
if?((obj==null))?{
return?null;
}
android.os.IInterface?iin?=?obj.queryLocalInterface(DEscriptOR);
if?(((iin!=null)&&(iin?instanceof?com.example.AIDL.Music)))?{
return?((com.example.AIDL.Music)iin);
}
return?new?com.example.AIDL.Music.Stub.Proxy(obj);
}
@Override?public?android.os.IBinder?asBinder()
{
return?this;
}
@Override?public?boolean?onTransact(int?code?android.os.Parcel?data?android.os.Parcel?reply?int?flags)?throws?android.os.RemoteException
{
switch?(code)
{
case?INTERFACE_TRANSACTION:
{
reply.writeString(DEscriptOR);
return?true;
}
case?TRANSACTION_Play:
{
data.enforceInterface(DEscriptOR);
this.Play();
reply.writeNoException();
return?true;
}
case?TRANSACTION_Pause:
{
data.enforceInterface(DEscriptOR);
this.Pause();
reply.writeNoException();
return?true;
}
case?TRANSACTION_Pre:
{
data.enforceInterface(DEscriptOR);
this.Pre();
reply.writeNoException();
return?true;
}
case?TRANSACTION_Next:
{
data.enforceInterface(DEscriptOR);
this.Next();
reply.writeNoException();
return?true;
}
case?TRANSACTION_isPlaying:
{
data.enforceInterface(DEscriptOR);
boolean?_result?=?this.isPlaying();
reply.writeNoException();
reply.writeInt(((_result)?(1):(0)));
return?true;
}
case?TRANSACTION_Duration:
{
data.enforceInterface(DEscriptOR);
int?_result?=?this.Duration();
reply.writeNoException();
reply.writeInt(_result);
return?true;
}
case?TRANSACTION_CurrentPosition:
{
data.enforceInterface(DEscriptOR);
int?_result?=?this.CurrentPosition();
reply.writeNoException();
reply.writeInt(_result);
return?true;
}
case?TRANSACTION_ChangeMode:
{
data.enforceInterface(DEscriptOR);
int?_arg0;
_arg0?=?data.readInt();
this.ChangeMode(_arg0);
reply.writeNoException();
return?true;
}
case?TRANSACTION_CurrentMode:
{
data.enforceInterface(DEscriptOR);
int?_result?=?this.CurrentMode();
reply.writeNoException();
reply.writeInt(_result);
return?true;
}
case?TRANSACTION_SeekTo:
{
data.enforceInterface(DEscriptOR);
int?_arg0;
_arg0?=?data.readInt();
this.SeekTo(_arg0);
reply.writeNoException();
return?true;
}
}
return?super.onTransact(code?data?reply?flags);
}
private?static?class?Proxy?implements?com.example.AIDL.Music
{
private?android.os.IBinder?mRemote;
Proxy(android.os.IBinder?remote)
{
mRemote?=?remote;
}
@Override?public?an
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-03-13?17:00??AIDLTest\
?????文件?????????475??2015-03-13?17:00??AIDLTest\.classpath
?????文件?????????844??2015-03-13?17:00??AIDLTest\.project
?????目錄???????????0??2015-03-13?17:00??AIDLTest\.settings\
?????文件?????????177??2015-03-13?17:00??AIDLTest\.settings\org.eclipse.jdt.core.prefs
?????文件?????????985??2015-03-13?17:00??AIDLTest\AndroidManifest.xm
?????目錄???????????0??2015-03-13?17:00??AIDLTest\assets\
?????目錄???????????0??2015-03-13?17:00??AIDLTest\gen\
?????目錄???????????0??2015-03-13?17:00??AIDLTest\gen\com\
?????目錄???????????0??2015-03-13?17:00??AIDLTest\gen\com\example\
?????目錄???????????0??2015-03-13?17:00??AIDLTest\gen\com\example\AIDL\
?????目錄???????????0??2015-03-13?17:00??AIDLTest\gen\com\example\aidltest\
?????文件?????????162??2015-03-13?17:00??AIDLTest\gen\com\example\aidltest\BuildConfig.java
?????文件????????3218??2015-03-13?17:00??AIDLTest\gen\com\example\aidltest\R.java
?????文件????????8496??2015-03-13?17:00??AIDLTest\gen\com\example\AIDL\Music.java
?????文件???????51394??2015-03-13?17:00??AIDLTest\ic_launcher-web.png
?????目錄???????????0??2015-03-13?17:00??AIDLTest\libs\
?????文件??????627582??2015-03-13?17:00??AIDLTest\libs\android-support-v4.jar
?????文件?????????781??2015-03-13?17:00??AIDLTest\proguard-project.txt
?????文件?????????563??2015-03-13?17:00??AIDLTest\project.properties
?????目錄???????????0??2015-03-13?17:00??AIDLTest\res\
?????目錄???????????0??2015-03-13?17:00??AIDLTest\res\drawable-hdpi\
?????文件????????7658??2015-03-13?17:00??AIDLTest\res\drawable-hdpi\ic_launcher.png
?????目錄???????????0??2015-03-13?17:00??AIDLTest\res\drawable-ldpi\
?????目錄???????????0??2015-03-13?17:00??AIDLTest\res\drawable-mdpi\
?????文件????????3777??2015-03-13?17:00??AIDLTest\res\drawable-mdpi\ic_launcher.png
?????目錄???????????0??2015-03-13?17:00??AIDLTest\res\drawable-xhdpi\
?????文件???????12516??2015-03-13?17:00??AIDLTest\res\drawable-xhdpi\ic_launcher.png
?????目錄???????????0??2015-03-13?17:00??AIDLTest\res\drawable-xxhdpi\
?????文件???????24777??2015-03-13?17:00??AIDLTest\res\drawable-xxhdpi\ic_launcher.png
?????目錄???????????0??2015-03-13?17:00??AIDLTest\res\layout\
............此處省略29個文件信息
評論
共有 條評論