本文整理汇总了Java中net.sourceforge.servestream.utils.DetermineActionTask类的典型用法代码示例。如果您正苦于以下问题:Java DetermineActionTask类的具体用法?Java DetermineActionTask怎么用?Java DetermineActionTask使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DetermineActionTask类属于net.sourceforge.servestream.utils包,在下文中一共展示了DetermineActionTask类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processUri
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
private boolean processUri(String input) {
Uri uri = TransportFactory.getUri(input);
if (uri == null) {
return false;
}
UriBean uriBean = TransportFactory.findUri(mStreamdb, uri);
if (uriBean == null) {
uriBean = TransportFactory.getTransport(uri.getScheme()).createUri(uri);
AbsTransport transport = TransportFactory.getTransport(uriBean.getProtocol());
transport.setUri(uriBean);
if (mPreferences.getBoolean(PreferenceConstants.AUTOSAVE, true)) {
mStreamdb.saveUri(uriBean);
updateList();
}
}
showDialog(LOADING_DIALOG);
mDetermineActionTask = new DetermineActionTask(getActivity(), uriBean, this);
mDetermineActionTask.execute();
return true;
}
示例2: onMusicRetrieverPrepared
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
@Override
public void onMusicRetrieverPrepared(String action, UriBean uri, long[] list) {
dismissDialog(LOADING_DIALOG);
if (action.equals(DetermineActionTask.URL_ACTION_UNDETERMINED)) {
showUrlNotOpenedToast();
} else if (action.equals(DetermineActionTask.URL_ACTION_BROWSE)) {
if (mPreferences.getBoolean(PreferenceConstants.AUTOSAVE, true)) {
mStreamdb.touchUri(uri);
}
mListener.browseToUri(uri.getScrubbedUri());
} else if (action.equals(DetermineActionTask.URL_ACTION_PLAY)) {
if (mPreferences.getBoolean(PreferenceConstants.AUTOSAVE, true)) {
mStreamdb.touchUri(uri);
}
MusicUtils.playAll(getActivity(), list, 0);
}
}
示例3: onMusicRetrieverPrepared
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
@Override
public void onMusicRetrieverPrepared(String action, UriBean uri, long[] list) {
if (action.equals(DetermineActionTask.URL_ACTION_UNDETERMINED)) {
dismissDialog(LOADING_DIALOG);
showUrlNotOpenedToast();
} else if (action.equals(DetermineActionTask.URL_ACTION_BROWSE)) {
mPreviousDirectory.put(mStepsBack, uri);
mStepsBack++;
mPreviousDirectory.put(mStepsBack, null);
mDirectory[mStepsBack] = uri;
refreshList();
} else if (action.equals(DetermineActionTask.URL_ACTION_PLAY)) {
dismissDialog(LOADING_DIALOG);
MusicUtils.playAll(BrowseFragment.this.getActivity(), list, 0);
}
}
示例4: processUri
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
private boolean processUri(String input) {
Uri uri = TransportFactory.getUri(input);
if (uri == null) {
return false;
}
UriBean uriBean = TransportFactory.findUri(mStreamdb, uri);
if (uriBean == null) {
uriBean = TransportFactory.getTransport(uri.getScheme()).createUri(uri);
AbsTransport transport = TransportFactory.getTransport(uriBean.getProtocol());
transport.setUri(uriBean);
if (mPreferences.getBoolean(PreferenceConstants.AUTOSAVE, true) && transport.shouldSave()) {
mStreamdb.saveUri(uriBean);
updateList();
}
}
showDialog(LOADING_DIALOG);
mDetermineActionTask = new DetermineActionTask(this.getActivity(), uriBean, this);
mDetermineActionTask.execute();
return true;
}
示例5: onMusicRetrieverPrepared
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
public void onMusicRetrieverPrepared(String action, UriBean uri, long[] list) {
dismissDialog(LOADING_DIALOG);
if (action.equals(DetermineActionTask.URL_ACTION_UNDETERMINED)) {
showUrlNotOpenedToast();
} else if (action.equals(DetermineActionTask.URL_ACTION_BROWSE)) {
if (mPreferences.getBoolean(PreferenceConstants.AUTOSAVE, true)) {
mStreamdb.touchUri(uri);
}
mListener.browseToUri(uri.getScrubbedUri());
} else if (action.equals(DetermineActionTask.URL_ACTION_PLAY)) {
if (mPreferences.getBoolean(PreferenceConstants.AUTOSAVE, true)) {
mStreamdb.touchUri(uri);
}
MusicUtils.playAll(getActivity(), list, 0);
}
}
示例6: browseTo
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
@SuppressLint("NewApi")
private void browseTo(UriBean uri) {
showDialog(LOADING_DIALOG);
DetermineActionTask determineActionTask = new DetermineActionTask(getActivity(), uri, this);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
determineActionTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} else {
determineActionTask.execute();
}
}
示例7: onMusicRetrieverPrepared
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
@Override
public void onMusicRetrieverPrepared(String action, UriBean uri, long[] list) {
if (action.equals(DetermineActionTask.URL_ACTION_PLAY)) {
MusicUtils.playAllFromService(AlarmKlaxon.this, list, 0);
} else {
mHandler.sendEmptyMessage(FALLBACK);
}
}
示例8: onClick
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
@Override
public void onClick(View v) {
Uri uri = TransportFactory.getUri("http://s6.voscast.com:7632");
UriBean uriBean = TransportFactory.getTransport(uri.getScheme()).createUri(uri);
AbsTransport transport = TransportFactory.getTransport(uriBean.getProtocol());
transport.setUri(uriBean);
mDetermineActionTask = new DetermineActionTask(getActivity(), uriBean, this);
mDetermineActionTask.execute();
}
示例9: onMusicRetrieverPrepared
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
@Override
public void onMusicRetrieverPrepared(String action, UriBean uri, long[] list) {
if (action.equals(DetermineActionTask.URL_ACTION_PLAY)) {
for(long i : list) {
Log.d("onMusicRetrieverPrepared", "fucking list" + i);
}
MusicUtils.playAll(getActivity(), list, 0);
}
}
示例10: onMusicRetrieverPrepared
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
public void onMusicRetrieverPrepared(String action, UriBean uri, long[] list) {
if (action.equals(DetermineActionTask.URL_ACTION_UNDETERMINED)) {
dismissDialog(LOADING_DIALOG);
showUrlNotOpenedToast();
} else if (action.equals(DetermineActionTask.URL_ACTION_BROWSE)) {
mPreviousDirectory.put(mStepsBack, uri);
mStepsBack++;
mPreviousDirectory.put(mStepsBack, null);
mDirectory[mStepsBack] = uri;
refreshList();
} else if (action.equals(DetermineActionTask.URL_ACTION_PLAY)) {
dismissDialog(LOADING_DIALOG);
MusicUtils.playAll(BrowseFragment.this.getActivity(), list, 0);
}
}
示例11: onMusicRetrieverPrepared
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
public void onMusicRetrieverPrepared(String action, UriBean uri, long[] list) {
if (action.equals(DetermineActionTask.URL_ACTION_PLAY)) {
MusicUtils.playAllFromService(AlarmKlaxon.this, list, 0);
} else {
mHandler.sendEmptyMessage(FALLBACK);
}
}
示例12: onStartCommand
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
mServiceStartId = startId;
mDelayedStopHandler.removeCallbacksAndMessages(null);
if (intent != null) {
String action = intent.getAction();
String cmd = intent.getStringExtra("command");
if (CMDNEXT.equals(cmd) || NEXT_ACTION.equals(action)) {
gotoNext(true);
} else if (CMDPREVIOUS.equals(cmd) || PREVIOUS_ACTION.equals(action)) {
if (position() < 2000) {
prev();
} else {
seek(0);
play();
}
} else if (CMDTOGGLEPAUSE.equals(cmd) || TOGGLEPAUSE_ACTION.equals(action)) {
boolean remove_status_icon = (intent.getIntExtra(CMDNOTIF, 0) != 1);
if (isPlaying()) {
pause(remove_status_icon);
mPausedByTransientLossOfFocus = false;
} else {
play();
}
if (!remove_status_icon) {
updateNotification(true);
}
} else if (CMDPAUSE.equals(cmd) || PAUSE_ACTION.equals(action)) {
pause(true);
mPausedByTransientLossOfFocus = false;
} else if (CMDPLAY.equals(cmd)) {
play();
} else if (CMDSTOP.equals(cmd)) {
pause(true);
mPausedByTransientLossOfFocus = false;
seek(0);
} else if (BLUETOOTH_DEVICE_PAIRED.equals(action)) {
Uri uri = TransportFactory.getUri(intent.getStringExtra("uri"));
if (uri != null) {
UriBean uriBean = TransportFactory.getTransport(uri.getScheme()).createUri(uri);
AbsTransport transport = TransportFactory.getTransport(uriBean.getProtocol());
transport.setUri(uriBean);
new DetermineActionTask(this, uriBean, this).execute();
}
}
}
// make sure the service will shut down on its own if it was
// just started but not bound to and nothing is playing
mDelayedStopHandler.removeCallbacksAndMessages(null);
Message msg = mDelayedStopHandler.obtainMessage();
mDelayedStopHandler.sendMessageDelayed(msg, IDLE_DELAY);
return START_STICKY;
}
示例13: onMusicRetrieverPrepared
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
@Override
public void onMusicRetrieverPrepared(String action, UriBean uri, long[] list) {
if (action.equals(DetermineActionTask.URL_ACTION_PLAY)) {
open(list, 0);
}
}
示例14: browseTo
import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
private void browseTo(UriBean uri) {
showDialog(LOADING_DIALOG);
new DetermineActionTask(this.getActivity(), uri, this).execute();
}