-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tried injecting the serverClient in the tv audio player (#244)
Added background updates for the Tv Audio player Added other rows in the Android TV Implemented play/pause fo ATV audio player Added the progress bar in the Atv music player. Added seek bar in the video fragment. Added functionality to the bottom row. Fixed the audio player bug. Improved the header. Implemented the rewind, fast-forwar, skip-next and skip-previous buttons in the music player. Plays next song once the current song ends. Added some improvements to the Audio and video player of ATV. Updated meta_data for audio player.
- Loading branch information
Showing
15 changed files
with
636 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/main/java/org/amahi/anywhere/tv/activity/TvPlaybackAudioActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package org.amahi.anywhere.tv.activity; | ||
|
||
import android.app.Activity; | ||
import android.app.Fragment; | ||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
|
||
import org.amahi.anywhere.AmahiApplication; | ||
import org.amahi.anywhere.R; | ||
import org.amahi.anywhere.server.client.ServerClient; | ||
import org.amahi.anywhere.server.model.ServerFile; | ||
import org.amahi.anywhere.server.model.ServerShare; | ||
import org.amahi.anywhere.tv.fragment.TvPlaybackAudioFragment; | ||
import org.amahi.anywhere.util.Intents; | ||
|
||
import java.util.ArrayList; | ||
|
||
import javax.inject.Inject; | ||
|
||
public class TvPlaybackAudioActivity extends Activity { | ||
|
||
@Inject | ||
ServerClient serverClient; | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_tv_audio_playback); | ||
setUpInjections(); | ||
getFragmentManager().beginTransaction().replace(R.id.playback_controls_fragment_container, buildAudioFragment()).commit(); | ||
} | ||
|
||
private void setUpInjections() { | ||
AmahiApplication.from(this).inject(this); | ||
} | ||
|
||
private Fragment buildAudioFragment(){ | ||
Fragment fragment = new TvPlaybackAudioFragment(); | ||
Bundle bundle = new Bundle(); | ||
bundle.putParcelable(Intents.Extras.SERVER_SHARE,getShare()); | ||
bundle.putParcelable(Intents.Extras.SERVER_FILE,getFile()); | ||
bundle.putParcelableArrayList(Intents.Extras.SERVER_FILES,getFiles()); | ||
fragment.setArguments(bundle); | ||
return fragment; | ||
} | ||
|
||
private ServerShare getShare(){ | ||
return getIntent().getParcelableExtra(Intents.Extras.SERVER_SHARE); | ||
} | ||
|
||
private ServerFile getFile(){ | ||
return getIntent().getParcelableExtra(Intents.Extras.SERVER_FILE); | ||
} | ||
|
||
private ArrayList<ServerFile> getFiles(){ | ||
return getIntent().getParcelableArrayListExtra(Intents.Extras.SERVER_FILES); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.