Android RemoteControlClient - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android RemoteControlClient class.

This code example shows how to use the following methods: setPlaybackState, setTransportControlFlags
This code example shows how to use the following methods: setTransportControlFlags
This code example shows how to use the following methods: setPlaybackState
	} 
 
	@TargetApi(14) 
	public void removeLockscreenControls() { 
		if (_remoteControlClient != null)
			_remoteControlClient.setPlaybackState(RemoteControlClient.PLAYSTATE_STOPPED);
	} 
 
	@TargetApi(14) 
	public void setLockscreenPaused() { 
		if (_remoteControlClient == null)
			return; 
		_remoteControlClient.setPlaybackState(RemoteControlClient.PLAYSTATE_PAUSED);
	} 
 
	@TargetApi(14) 
	public void setLockscreenPlaying() { 
		if (_remoteControlClient == null)
			return; 
		_remoteControlClient.setPlaybackState(RemoteControlClient.PLAYSTATE_PLAYING);
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: unregisterRemoteControlClient
		getAudioManager().registerRemoteControlClient(getRemoteControlClient());
	} 
 
	@Override 
	public void onPlaybackStopped() { 
		getAudioManager().unregisterRemoteControlClient(
				getRemoteControlClient()); 
	} 
 
	@Override 
	public void onTitleChanged(String title) {
		getRemoteControlClient().editMetadata(false)
				.putString(MediaMetadataRetriever.METADATA_KEY_TITLE, title)
				.apply();
	} 
 
	@Override 
	public void onArtistChanged(String artist) {
		getRemoteControlClient().editMetadata(false)
				.putString(MediaMetadataRetriever.METADATA_KEY_ARTIST, artist)

5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setPlaybackState, setTransportControlFlags
		// build the PendingIntent for the remote control client 
		Intent mediaButtonIntent = new Intent(Intent.ACTION_MEDIA_BUTTON);
		mediaButtonIntent.setComponent(myEventReceiver);
		PendingIntent mediaPendingIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, mediaButtonIntent, 0);
		// create and register the remote control client 
		myRemoteControlClient = new RemoteControlClient(mediaPendingIntent);
		myAudioManager.registerRemoteControlClient(myRemoteControlClient);
 
		myRemoteControlClient.setPlaybackState(RemoteControlClient.PLAYSTATE_STOPPED);
		myRemoteControlClient.setTransportControlFlags(RemoteControlClient.FLAG_KEY_MEDIA_PLAY | RemoteControlClient.FLAG_KEY_MEDIA_PAUSE | RemoteControlClient.FLAG_KEY_MEDIA_STOP);
		 
		dialog = ProgressDialog.show(this, null, "曲を探しています...", true, false);
		final ContentResolver cr = this.getContentResolver();
		new Thread(new Runnable() {
			private String getWhereClause() {
				StringBuilder s = new StringBuilder();
				 
				s.append(MediaStore.Files.FileColumns.MEDIA_TYPE).append("=").append(MediaStore.Files.FileColumns.MEDIA_TYPE_NONE);
				s.append(" AND (");
				s.append("LOWER(").append(MediaStore.Files.FileColumns.DATA).append(") LIKE '%.s98'");
Full Snippet Info
5
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Android RemoteControlClient Questions & Answers:

See Code Examples for Android RemoteControlClient Methods: