当前位置: 首页>>代码示例>>Java>>正文


Java DetermineActionTask类代码示例

本文整理汇总了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;
}
 
开发者ID:wseemann,项目名称:ServeStream,代码行数:26,代码来源:UrlListFragment.java

示例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);        
	}
}
 
开发者ID:wseemann,项目名称:ServeStream,代码行数:21,代码来源:UrlListFragment.java

示例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);        
	}
}
 
开发者ID:wseemann,项目名称:ServeStream,代码行数:17,代码来源:BrowseFragment.java

示例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;
}
 
开发者ID:minstrelsy,项目名称:servestream,代码行数:26,代码来源:UrlListFragment.java

示例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);        
	}
}
 
开发者ID:minstrelsy,项目名称:servestream,代码行数:20,代码来源:UrlListFragment.java

示例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();
   	}
   }
 
开发者ID:wseemann,项目名称:ServeStream,代码行数:13,代码来源:BrowseFragment.java

示例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);
	}
}
 
开发者ID:wseemann,项目名称:ServeStream,代码行数:9,代码来源:AlarmKlaxon.java

示例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();

}
 
开发者ID:abeluck,项目名称:radioplayer,代码行数:11,代码来源:RadioFragment.java

示例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);
	}

}
 
开发者ID:abeluck,项目名称:radioplayer,代码行数:11,代码来源:RadioFragment.java

示例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);        
	}
}
 
开发者ID:minstrelsy,项目名称:servestream,代码行数:16,代码来源:BrowseFragment.java

示例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);
	}
}
 
开发者ID:minstrelsy,项目名称:servestream,代码行数:8,代码来源:AlarmKlaxon.java

示例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;
}
 
开发者ID:wseemann,项目名称:ServeStream,代码行数:61,代码来源:MediaPlaybackService.java

示例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);
	}
}
 
开发者ID:wseemann,项目名称:ServeStream,代码行数:7,代码来源:MediaPlaybackService.java

示例14: browseTo

import net.sourceforge.servestream.utils.DetermineActionTask; //导入依赖的package包/类
private void browseTo(UriBean uri) {
 showDialog(LOADING_DIALOG);
    new DetermineActionTask(this.getActivity(), uri, this).execute();
}
 
开发者ID:minstrelsy,项目名称:servestream,代码行数:5,代码来源:BrowseFragment.java


注:本文中的net.sourceforge.servestream.utils.DetermineActionTask类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。