Tuesday, December 8, 2015

MusiKal-The App Structure

Okay, so the app name is probably MusiKal and hopefully I can span both the Google Play Store and the Amazon Store and devices without too much pain. But the app structure is not something that can be quickly hacked together but instead requires some planning.

The AndroidTV UI stuff is accessible at 17 via the support library called leanback but AndroidTV is actually 21 api. Android Auto is 21 or higher. And Amazon Fire TV uses different stuff than AndroidTV. But since LeanBack Support lib is not using the native part I can do one combined UI as module library that spans both Google Android and Amazon Fire.

The fly-in-the-soup is Android Auto which is 21 or higher. So on the Google side of things I have to one app that spans 17 to 19 and than another app edition that spans 21 to 23 that includes Android Auto. The app that spans 21 to 23 would have two library UI modules as dependencies one that is the common UI and one that has the Android Auto specifics.

Android Wear is its own separate app and there are NotificationCompat classes in the support libs for the phone/tablet side of things.

On the Amazon side its a little easier one app for both phone/tablet and tv.  Still have to find a Google cast replacement though.

I will be using the MVP approach as with AndroidTV UI its Presenter based. And I will be using Dagger2. I am keeping using package names to identify the domain layers.

On a side note, the audioFX new apis start coming in at api 17 and 18 anyway so its a chance to use those as well as the default music player in android OS does not use them for some odd reason.

If you are a Github member and do a follow of me you will see the github repo for this pop-up as the name GWSMusiKal:


GWSMusiKal Repo 



So that is generally the approach to it..Sort of different than the Google approach with that Universal Music App sample as on a lot of stuff they just punted..well its simplistic sample what do you expect?  It does look backwards in that most of the app is in gradle subproject modules which had to be implemented that way to so that I could implement apps both for Google Play Store and Amazon Store.