Android development and architecture • Provides a new lens to view multiple Android teams in a company • Smaller teams can use it as a look into a potential future • It’s fun
• pros: • easier to begin with, just add the other apps • cons: • lack of separation of concerns • lots of non-platform code • standalone app and MiniApp will diverge
SuperApp • Be able to use our current largest app (ride hailing) from this new app • Repeat for other apps and build a shell interface. • Pros: • cleaner, more correct • standalone app and SuperApp implementations can converge • Cons: • more upfront cost
f erent from any random library module? • com.android.library vs com.android.application • Gradle con f i gurations relevant to apps and not to libraries
so… • minSdk overridden by SuperApp (gate mini apps until bump minSdk) • owns the Application subclass • owns other shared components • MiniApp con f l icting pieces move to their container
R.layout.activity_splash • SuperApp gets… R.layout.activity_splash • which one? ¯\_(ツ)_/¯ • it just picks one. • This is also why appcompat, etc pre f i x
listInitializer: ListInitializer override fun onCreate() { super.onCreate() setupAndInject() / / run all the initializers listInitializer.initialize(this) } }
listInitializer: ListInitializer override fun onCreate() { super.onCreate() setupAndInject() / / run all the initializers listInitializer.initialize(this) } }
listInitializer: ListInitializer override fun onCreate() { super.onCreate() setupAndInject() / / run all the initializers listInitializer.initialize(this) } }
miniApps: List<@JvmSuppressWildcards MiniApp> override fun onCreate() { super.onCreate() setupAndInject() / / run mini app initializers when needed } }
initializing the MiniApp. * Keep this as light as possible. * / fun provideInitializer(): Initializer? /** * Provide logic to handle a push message. * Push messages received here will only be those that have an app_id of * this particular app (unless it's the only app) * / fun providePushRecipient(): PushMessageRecipient? = null }
for initializing the MiniApp. * Keep this as light as possible. * / fun provideInitializer(): Initializer? /** * Provide logic to handle a push message. * Push messages received here will only be those that have an app_id of * this particular app (unless it's the only app) * / fun providePushRecipient(): PushMessageRecipient? = null }
this. The method here is already on MiniApp", level = DeprecationLevel.ERROR ) interface PushRecipientMarker { fun providePushRecipient(): PushMessageRecipient? = null }
modularization opportunities • sharing is closer than you might imagine • helps lead to cleaner code • opens up opportunities for open source in the future • Consider a shared design library early on • Establish regular conversations with Android devs throughout the company
our apps, so all are reachable in just a tap, we didn’t have a lot of time, so here’s a summary through a rhyme. Convert the apps into libraries, resolving manifest ambiguities, library dependencies can be a mess, Build order manifests make the pain less. Handling singletons was next in line, Casting to an application is no longer f i ne, the Application may not be the same, and so our dependencies we need to tame. After all was said and done, everything was great under the sun, well except the storm brewing about, resource con f l icts causing many a doubt. Once everything agreed to coexist, we could walk down our wish list, start o f f with building an API, in the KDocs we try not to lie. Backward compatibility we must do, in order to save a day or two, of updating MiniApps one by one, can be tedious and not quite fun. Work continues on platform turf, with a focus on speed and perf, not to mention quality of code, which is a never ending winding road. All of this is not to ignore, critical features to our core, tokens, login, and identity too, the home screen developed by the crew. Work like this needs a single team, combining our silos was always a dream, one that we’re realizing day by day, improving the process since release in May. I hope smaller companies share aars, design systems and utility jars, communication is an absolute must, that and action help build trust. That is all I have to say, Hope you enjoy the rest of your day.