本文整理汇总了Java中nl.changer.audiowife.AudioWife类的典型用法代码示例。如果您正苦于以下问题:Java AudioWife类的具体用法?Java AudioWife怎么用?Java AudioWife使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AudioWife类属于nl.changer.audiowife包,在下文中一共展示了AudioWife类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: retrieveFiles
import nl.changer.audiowife.AudioWife; //导入依赖的package包/类
private void retrieveFiles(){
RealmResults<CallHistory> result = myRealm.where(CallHistory.class)
.isNotNull(CallHistory.kCOL_FILE_PATH)
.findAllSorted(CallHistory.kCOL_DATE_TIME, Sort.DESCENDING);
arrayFilePaths.clear();
arrayCalls.clear();
if (result.size() > 0) {
for(CallHistory c:result) {
arrayFilePaths.add(PhoneNumberUtils.formatNumber(c.phoneNumber) + " " + getDate(c.dateTime, "d/MM/yyyy HH:mm:ss"));
arrayCalls.add(c);
}
}
if (adapter != null) {
adapter.notifyDataSetChanged();
if (arrayCalls.size() > 0 && !hasPlayerSetup){
AudioWife.getInstance().init(CallReceiverActivity.this, Uri.parse(arrayCalls.get(0).getFilePath())).useDefaultUi(llMediaPlayer, getLayoutInflater());
hasPlayerSetup = true;
}
}
}
示例2: onPause
import nl.changer.audiowife.AudioWife; //导入依赖的package包/类
@Override
protected void onPause() {
super.onPause();
// when done playing, release the resources
AudioWife.getInstance().release();
}
示例3: onPause
import nl.changer.audiowife.AudioWife; //导入依赖的package包/类
@Override
protected void onPause() {
super.onPause();
// when done playing, release the resources
AudioWife.getInstance().release();
mUri = null;
}
示例4: onDetachedFromRecyclerView
import nl.changer.audiowife.AudioWife; //导入依赖的package包/类
@Override
public void onDetachedFromRecyclerView(RecyclerView recyclerView) {
super.onDetachedFromRecyclerView(recyclerView);
AudioWife.getInstance().release();
}