Posts

Showing posts with the label Best Practices

IPC: A buzz word in Modern Android Development Paradigm

Image
  Inter-process communication (IPC) in Android is how different apps and system components talk to each other safely, even though each runs in its own isolated Linux process. Android achieves this with a kernel driver called Binder, wrapped in familiar APIs like Intents, Services, ContentProviders, AIDL, and Messenger.​ 1. Story first: apartments and the intercom Imagine every Android app as a separate apartment in a high-security building. Each apartment (process) has: Its own space (memory). Its own keys (UID/permissions). No direct access to other apartments. Yet, apps need to talk: Food-delivery app → asks Google Maps for routes. Camera app → sends photos to the gallery. Music app → asks the system if it can play over an ongoing call. Whenever this conversation crosses apartment boundaries (processes), you are doing IPC. Binder is the building’s intercom system that connects apartments and the building’s control room (system services).​ You already use IPC whenever you: St...

Guide to Android App Architecture: Google's Recommendation and Best Practices

Image
  Opening Note! Among numerous discussions and debates on the Internet these days about the suitable architecture to follow and adapt, Google recently published a detailed blog to follow best practices while we are articulating the Android App. App architecture defines the backbone of scalable, maintainable, and high-performance Android apps. In this article, I am trying to curate the key principles from Google’s official guide, ideal for an app architecture. The purpose of this article is to clarify architectural patterns and highlight universal best practices. Resources referenced: [Google’s Official Guide to App Architecture] [Phillipp Lackner’s YouTube Deep-dive]​ Common factors to design architecture 1. Tackle various config changes An Android App must run on a wide variety of available devices in the global market i.e., phones, tablets, foldables, and various orientations. Configuration changes like screen rotation, recreate activities. We must use ViewModels to preser...