Skip to content

App illustrating the Musical Structure App Project, done as part of Udacity's Android Basics Nanodegree course.

License

Notifications You must be signed in to change notification settings

kaushiknsanji/RhythmApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rhythm - Musical Structure App

GitHub GitHub code size in bytes GitHub repo size GitHub release (latest by date) GitHub All Releases GitHub search hit counter Minimum API level

This App has been developed as part of the Udacity Android Basics Nanodegree Course for the Exercise Project "Musical Structure App". App showcases a structure/approach typically used for Apps that play music, without implementing its functionality. Project mainly focuses on App designing.


App Compatibility

Android device running with Android OS 4.0.4 (API Level 15) or above. Best experienced on Android Nougat 7.1 and above. Designed for Phones and NOT for Tablets.


Rubric followed for the Project

  • App's Structure needs to be suitable for a Music Player App.
  • Each Screen has a TextView that explains the purpose of it in a concise way.
  • App must also contain a Payment Activity that requires user to make Payment for some situation, describing how the library/API will be used.
  • App has atleast 3 - 6 activities which makes a cohesive music app.
  • Each activity has buttons that enables a user to reach other activities.
  • Uses Explicit intents to launch activities.
  • Should make use of OnClickListeners instead of XML attributes.
  • Should not mock up or add real content. Static data from resources are allowed. As mock up is not allowed, Adapter Views and RecyclerView should not be used. This enables more practice with using layouts.

Stuff explored/developed in addition to the above defined Rubric

  • Fiddled with CoordinatorLayout along with CollapsibleToolbar and DrawerLayout.
  • Used ConstraintLayout heavily for most of the layouts along with custom styles.
  • Created a custom WindowInsetsFrameLayout for dispatching the Window insets from the DrawerLayout to the Fragments shown in this FrameLayout's container, when its FitSystemWindows property is set.
  • Implemented Base class architecture for abstracting the common tasks to be executed by Activities and Fragments.
  • Persistent Bottom Player is shown in many Fragments and Activities. PlayerActivity and PlayerFragment extends the Base classes for Activities and Fragments respectively to abstract the implementation details of the persistent Bottom Sheet.
  • Common tasks of the Drawer Fragments shown in the HomeActivity are abstracted by DrawerFragment abstract class that extends the PlayerFragment abstract class, as they also need to show the Persistent Bottom Player.
  • Music Player controls are simulated by using a Bound Service PlayerService. It provides the necessary Play/Pause/Restart methods to control the Player progress value generated by an Internal Worker Thread.
  • Implemented a custom AppBarLayout Behavior to control the Nested scroll events on Layouts with Bottom Sheets, to prevent the scroll from being consumed by the Layout behind the Bottom Sheet when a scroll event occurs on the Expanded Bottom Sheet.
  • Implemented a custom FloatingActionButton Behavior to control the visibility and appearance of the FloatingActionButton when anchored to views other than AppBarLayout or views with BottomSheetBehavior, as these are taken care by default.
  • Implemented a BottomSheetDialogFragment to show a dialog appearing from the Bottom, to capture the Payment when the user tries to play a song from any of the Jukebox services, to simulate the Paid service.
  • Used Animated Vector Drawables for transitioning between "Play-Pause" and "Like-Unlike" drawables through animations.

Design Workflow

The Home Screen or the Main Activity of the App

Home Drawer Home Content(1) Home Content(2)
home_drawer home_1 home_2

The HomeActivity of the App is the Main Activity of the App that has a Navigation Drawer. The Main content will have some of the Drawer Items shown by the content fragment HomeFragment.

Drawer Menu : Albums

Album List(1) Album List(2) Album Detail(1) Album Detail(2)
album_1 album_2 album_detail_1 album_detail_2
  • List of Albums available are shown by the content fragment AlbumListFragment.
  • Clicking on each Album will launch the respective Album Details shown by the AlbumDetailActivity.
  • AlbumDetailActivity shows relevant info on the Album and list of Songs available in the Album.
  • Each Song has click interaction that starts playing the Song track clicked (simulation only).

Drawer Menu : Artists

Artist List(1) Artist List(2) Artist Detail(1) Artist Detail(2)
artist_1 artist_2 artist_detail_1 artist_detail_2
  • List of Artists available are shown by the content fragment ArtistListFragment.
  • Clicking on each Artist will launch the respective Artist Details shown by the ArtistDetailActivity.
  • ArtistDetailActivity shows the Albums of the Artist available and the Artist's Songs available in each of those Albums.
  • Each Song has click interaction that starts playing the Song track clicked (simulation only).

Drawer Menu : Songs

Song List(1) Song List(2)
song_list_1 song_list_2
  • List of Songs available are shown by the content fragment SongListFragment.
  • Each Song has click interaction that starts playing the Song track clicked (simulation only).

Drawer Menu : Playlists

Playlist (1) Playlist (2) Playlist Detail(1) Playlist Detail(2)
playlist_1 playlist_2 playlist_detail_1 playlist_detail_2
  • List of Playlists (User/Smart) available are shown by the content fragment PlayQueueListFragment.
  • Clicking on each Playlist will launch the respective Playlist Details shown by the PlayQueueDetailActivity.
  • PlayQueueDetailActivity shows the list of Songs enqueued in the Playlist.
  • Each Song has click interaction that starts playing the Song track clicked (simulation only).

Drawer Menu : Jukebox

Jukebox List(1) Jukebox List(2) Jukebox Detail(1) Jukebox Detail(2)
jukebox_1 jukebox_2 jukebox_detail_1 jukebox_detail_2

Bottom Sheet Dialog for Payment request

  • List of Jukebox channels available are shown by the activity JukeboxListActivity.
  • Clicking on each Jukebox channel will launch the respective Jukebox Details shown by the JukeboxDetailActivity.
  • If the user has not yet subscribed (made payment) to the channel, then a BottomSheetDialog will be shown (on click of any Song) to request and initiate the Payment. The Payment captured here is sent back to the JukeboxDetailActivity, and the activity starts playing the song clicked after payment confirmation. The BottomSheetDialog is shown by JukeboxDetailPaymentDialogFragment. Payment is just a simulation here to show the use of Payment requests and how it can be implemented in terms of design.

Bottom Sheet Player

Player Portait(1) Player Portait(2) Player Landscape
bottom_sheet_player_1 bottom_sheet_player_2 bottom_sheet_player_land
  • Bottom Sheet Player is a persistent Bottom Sheet that is shown in all Fragments and Activities that require it to be shown.
  • Fragments that extend PlayerFragment and Activities that extend PlayerActivity needs to include the Bottom Sheet Player layout_all_player to show the persistent collapsed Bottom Sheet Player.
  • When clicked on the collapsed Bottom Sheet Player, it expands to fill the entire screen, to show the "Now Playing" information along with all the Music Player controls.
  • Music Player Controls simulate the functionality by binding to the PlayerService. The PlayerService provides methods for Play/Pause/Restart that control the player progress value generated by an internal worker thread.
  • Player information stays persisted across all Fragments and Activities by saving the info in PlayerComposition which is tied to the Application Lifecycle.

Scrolling Behavior for AppBarLayouts

  • Nested Scrolls initiated by Bottom Sheet are by default, accepted by layouts behind the Bottom Sheet, causing some weird UI motion.
  • In order to prevent this, all layouts that have Bottom Sheet, has this behavior BottomSheetAwareAppBarBehavior attached to their AppBarLayout.
  • This custom behavior denies the Nested scrolls generated by Bottom Sheets, so that the scrolling only happens on the Bottom Sheet shown and not the layout behind it.

Anchored FAB Behaviors

  • FloatingActionButton anchored to AppBarLayout and CoordinatorLayouts with Bottom Sheet, manage the scale and the visibility of the FAB depending on the changes in Anchored View.
  • For any other Anchored Views like CollapsingToolbarLayout, we need to take care of the same. This is provided by the behavior ScrollAwareAnchoredFabBehavior attached to such FABs.
  • This behavior looks for the change in the visible height of the dependent/anchored view and applies the same to scale the FAB and change its visibility accordingly.

About Activity

  • Launches via the "About" Menu and Drawer Menu available in the HomeActivity.
  • This is shown by the AboutActivity
  • This page describes in brief about the app, and has links to my bio and the course details hosted by Udacity.

Branches in this Repository

  • udacity
    • Contains the code submitted for review, along with review suggestions incorporated.
  • release_v1.0
    • Configured an Activity Alias to launch the HomeActivity.
    • Added a Keep entry in Proguard to the keep the names of the UI Classes and their Fragment TAGs AS-IS. Without this, fragments will NOT get launched, since the TAGs are dependent on their Class names.
    • Other minor changes to prepare the app for local release.

Icon/Image credits

All colorful icons used in the App are from Icons8.


Review from the Reviewer (Udacity)

Review_Musical_Structure


License

Copyright 2019 Kaushik N. Sanji

Licensed under the Apache License, Version 2.0 (the "License"); 
you may not use this file except in compliance with the License. 
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0
   
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

App illustrating the Musical Structure App Project, done as part of Udacity's Android Basics Nanodegree course.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages