Code example for RemoteControlClient

Methods: editMetadatasetPlaybackState

0
 
	} 
 
	public void setMetaData(String author, String title) {
		 
		MetadataEditor editor = myRemoteControlClient.editMetadata(true);
		//editor.String(MediaMetadataRetriever.METADATA_KEY_HAS_AUDIO, "true"); 
		if(author != null) {
			editor.putString(MediaMetadataRetriever.METADATA_KEY_ARTIST,  author);
			editor.putString(MediaMetadataRetriever.METADATA_KEY_ALBUMARTIST,  author);
		} 
		editor.putString(MediaMetadataRetriever.METADATA_KEY_COMPOSER,  (String) "composer");
		if(title != null)
			editor.putString(MediaMetadataRetriever.METADATA_KEY_TITLE, (String) title);
		else 
			editor.putString(MediaMetadataRetriever.METADATA_KEY_TITLE, "UNKNOWN");
		editor.apply();
		myRemoteControlClient.setPlaybackState(RemoteControlClient.PLAYSTATE_PLAYING);
	} 
 
	public void setState(int state) {
		int s = -1;
		switch(state) {
Experience pair programming with AI  Get Codota for Java