<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[AndroIDIOTS - Medium]]></title>
        <description><![CDATA[An android developer publication to stay updated with whats new in android, best practices and how to become a better android developer - Medium]]></description>
        <link>https://medium.com/androidiots?source=rss----eea095bae2c2---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>AndroIDIOTS - Medium</title>
            <link>https://medium.com/androidiots?source=rss----eea095bae2c2---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 12 Nov 2026 19:21:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/androidiots" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding Client Driven UI: Limitations and the Rise of Server Driven UI]]></title>
            <link>https://medium.com/androidiots/understanding-client-driven-ui-limitations-and-the-rise-of-server-driven-ui-372a71c9c362?source=rss----eea095bae2c2---4</link>
            <guid isPermaLink="false">https://medium.com/p/372a71c9c362</guid>
            <category><![CDATA[articles]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[mobile-app-developers]]></category>
            <dc:creator><![CDATA[Anupam Singh]]></dc:creator>
            <pubDate>Fri, 29 Dec 2023 12:20:34 GMT</pubDate>
            <atom:updated>2023-12-29T16:44:22.726Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pnPGgeIs4y4vurbU" /><figcaption>Photo by <a href="https://unsplash.com/@edwinhooper?utm_source=medium&amp;utm_medium=referral">Edwin Hooper</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Let’s start with a clear warning: If you’re not a Mobile App Dev Geek like me, this article is not for you. Save some time and skip the article.</p><p>If you ask GPT this is the answer it spits out</p><blockquote>CDUI (Client-Driven User Interface) is a software development approach where the client-side code is responsible for defining and rendering the user interface, allowing for dynamic UI generation based on data received from the backend.</blockquote><p>Alot of jargons right ! Before we unravel whats Client Driven UI. We will cover some leading questions</p><h3><strong>What is a Mobile App?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZBUxnfn5b2ToKD2P" /></figure><p>A mobile app can be defined with two fundamental aspects:</p><ol><li><strong>User Interface (UI)</strong>: This component of a mobile app comprises the visual elements and design principles that users interact with. It includes the arrangement of components, selection of colors, and choice of typography to create a visually appealing and user-friendly interface. The UI is responsible for presenting information, enabling user interactions, and defining the overall look and feel of the app.</li><li><strong>Logic (UI Logic and Business Logic)</strong>: The logic within a mobile app encompasses two distinct but interconnected components:</li></ol><blockquote>UI Logic: This refers to the set of rules and behaviors that govern how the user interface responds to user inputs and events. UI logic ensures that the app’s components function correctly, respond to user gestures, and provide a seamless and intuitive user experience.</blockquote><blockquote>Business Logic: Business logic represents the core functionality and operations of the app that are not directly related to the user interface. It defines how data is processed, stored, and manipulated, as well as the underlying algorithms and rules that drive the app’s intended purpose. Business logic ensures that the app delivers the intended services, processes data accurately, and performs any necessary computations.</blockquote><p>Example: Bytes, a short 3 page app, of landing screen, category screen and article screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IRdx9ZfQp7McAVuQ" /></figure><h3><strong>What is Mobile App Development?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7Mz1oZWqKPENlM_D" /></figure><p>Mobile app development involves creating software for mobile devices. In this process, a server and a client communicate using JSON data. While the server sends raw data, the client interprets and processes this data to independently create and manage the user interface (UI). UI elements and business logic are predominantly implemented on the client side, especially in the context of <strong>client-driven UI</strong>.</p><h3><strong>What is Client Driven UI ?</strong></h3><p><strong>Client-Driven User Interface (UI)</strong> is an approach in app development where the client-side code is primarily responsible for defining and rendering the user interface, allowing dynamic UI generation and adaptation based on local data and logic.</p><p>And over simplified Steps are :</p><p><strong>1.Component Creation</strong>: We meticulously designed and crafted user interface components tailored to the specific requirements of our application.</p><p><strong>2.Data Parsing and Model Creation</strong>: Our next step involved parsing data and constructing models to efficiently manage and manipulate the information we received from various sources.</p><p><strong>3.API Data Binding: </strong>We seamlessly integrated our components with data from APIs, ensuring a seamless flow of information. In this process, we also introduced essential business logic to enhance the functionality and user experience within our application.</p><p><strong>4.Cross-Platform Implementation:</strong> To reach a broader audience and ensure a consistent user experience, we replicated this entire process on multiple platforms, including Android, iOS, and web.</p><p><strong>5.Platform Releases:</strong> Finally, after rigorous testing and optimization, we delivered our application to users by submitting releases on all three major platforms — Android, iOS, and the web.</p><h3><strong>Does Client Driven UI Works?</strong></h3><p>Short Answer is YES, millions of apps ranging from games, social media, tools are build and they are updated billions of times every yea.r, and massive companies like Uber, AirBnb, SnapChat, Insta all run and are primarily built using client driven UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*EEL262OqrJ3umpZUdQvo-g.png" /><figcaption>Source: <a href="https://www.statista.com/statistics/271644/worldwide-free-and-paid-mobile-app-store-downloads/">Statista</a></figcaption></figure><h3>Problem with CDUI( Client Driven UI)</h3><p>Lets take example of Bytes app to elaborate further</p><h3>Problem No 1: <em>UI is Point of No Return</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yH7Xa5Oj7Y_GFHqh" /></figure><p>In the realm of Client-Driven UI (CDUI), a series of steps can lead to what we refer to as the “Form of No Return” in UI development. This critical juncture signifies that making significant changes or updates to the user interface becomes an arduous process, often necessitating a new release cycle.</p><p>The sequence of events typically unfolds as follows:</p><p><strong>1.Initial Development:</strong> In CDUI, you begin by designing and creating the user interface components. Initially, this allows for flexibility and adaptability.</p><p><strong>2.UI Lock-In:</strong> However, as development progresses, if you make decisions that “lock in” or hardcode the UI layout, you inch closer to the “Form of No Return.” This means that the UI becomes less flexible and resistant to accommodating future changes.</p><p><strong>3.Consequences:</strong> When you reach this critical stage, introducing new UI changes or adaptations requires going through an extensive release cycle. This entails additional development, testing, and app updates before users can experience the modifications.</p><h3>Problem No 2: <em>Not optimised for Runtime changes</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UEx2JzS_irC4r_ln" /></figure><p>In the realm of Client-Driven UI (CDUI), another notable challenge is its limited optimization for runtime changes. When the marketing team requests on-the-fly modifications, such as adding new buttons, conducting experiments, updating text, or changing values, CDUI may not be optimized for such dynamic alterations.</p><p>In CDUI, where UI components are often generated and managed based on data and logic present on the client side, accommodating runtime changes can be less straightforward. Here’s why this poses a challenge:</p><p><strong>1.UI Generation:</strong> CDUI typically generates UI elements based on predefined templates and data sources. Adding entirely new components or altering existing ones at runtime may require substantial code adjustments and testing.</p><p><strong>2.Data Binding:</strong> CDUI often relies on data-binding mechanisms, where UI elements are tied to specific data sources. When marketing teams request changes in real-time, ensuring that these modifications are seamlessly integrated without disrupting the existing UI can be complex.</p><p><strong>3.Testing and Validation:</strong> Each runtime change introduces the potential for unforeseen issues or conflicts within the app. Rigorous testing and validation become crucial, adding to the development timeline.</p><p><strong>4.Version Control:</strong> Managing multiple versions of the app can become challenging as runtime changes may create variations that need to be tracked and maintained.</p><h3>Problem No 3: <em>Repeated Layout and Business Logic</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oNcmt3_arUDIdXixaCkIIw.png" /><figcaption>want a similar look across android , ios and web, well there is a cost attached to it.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*TQy6P_Tee5Lla_s44Xy9Ng.png" /></figure><p>In the realm of Client-Driven UI (CDUI), a pervasive issue is the duplication of both layout and business logic across multiple platforms. This challenge revolves around the need to maintain consistency while developing for Android, iOS, and web platforms.</p><p>The key issues include:</p><p><strong>Cross-Platform Duplication: </strong>CDUI applications aim for a unified user experience across different platforms. However, achieving this consistency often necessitates duplicating layout and business logic for each platform individually.</p><p><strong>Redundant Effort:</strong> Developers are required to replicate the same UI layouts, designs, and interactive behaviors across Android, iOS, and web. This redundancy results in duplicated effort, consuming development resources and time.</p><p><strong>Complex Maintenance: </strong>As the app evolves or updates are required, ensuring that layout and business logic remain consistent across platforms becomes increasingly challenging. Any changes must be meticulously applied to each platform, making maintenance complex.</p><p><strong>Risk of Discrepancies: </strong>The more duplication there is, the greater the risk of introducing discrepancies or errors. These inconsistencies can negatively impact user satisfaction and the overall quality of the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/0*x8aglPXYrN-z80zZ" /><figcaption>Hey you only want the app to look and behave similar across all platfrom.</figcaption></figure><h3><strong>What do we want to solve then??</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y2NgnwfKbyG-3mbJ" /></figure><h3>What are the solutions?</h3><p>To address the complexities arising from Client-Driven UI (CDUI), developers are exploring two primary alternatives:</p><p><strong>1.Cross-Platform Development Frameworks</strong>: Many developers turn to cross-platform development frameworks, such as <a href="https://reactnative.dev/">React Native</a>, <a href="https://flutter.dev/">Flutter</a>, or <a href="https://dotnet.microsoft.com/en-us/apps/xamarin">Xamarin</a>. These frameworks empower developers to write code once and deploy it seamlessly across Android, iOS, and web platforms. By unifying the development process, these frameworks significantly reduce redundancy and streamline the task of maintaining consistency in the CDUI development landscape.</p><p><strong>2.Server-Driven UI (SDUI):</strong> A novel paradigm gaining traction is Server-Driven UI (SDUI). In SDUI, the server plays a pivotal role in controlling the user interface, allowing dynamic UI generation and adaptation based on real-time data and logic. Unlike traditional CDUI approaches, where layout and logic are primarily managed on the client side, SDUI centralizes UI control on the server, reducing the need for cross-platform duplication and enabling swift, server-driven changes.</p><h3>What is <strong>Server-Driven UI (SDUI)?</strong></h3><p>if you ask GPT this it what it spits out</p><blockquote>Server-Driven UI is a revolutionary paradigm shift in mobile app development. Unlike traditional approaches where the client-side dictates the app’s appearance and behavior, SDUI empowers the server to control these aspects. In simpler terms, the server becomes the mastermind behind the app’s user interface.</blockquote><h3>Anyone Uses it?</h3><p>Yes, Server-Driven User Interface (SDUI) is on the rise, and an increasing number of companies are adopting this approach to enhance the flexibility and efficiency of their applications. Here are a few examples of companies that have embraced SDUI:</p><p>Reddit:</p><p><a href="https://www.infoq.com/news/2023/09/reddit-feed-server-driven-ui/">Reddit Adopts Server-Driven UI for Its New Feed Architecture across Mobile Apps</a></p><p>Tinder:</p><p><a href="https://medium.com/tinder/how-tinder-solves-complex-lottie-localizations-with-server-driven-ui-e307c6bab137">How Tinder Solves Complex Lottie Localizations with Server Driven UI</a></p><p>Robinhood:</p><p><a href="https://medium.com/robinhood-engineering/how-server-driven-ui-is-helping-frontend-engineers-scale-impact-c7dce0c20064">How Server Driven UI is Helping Frontend Engineers Scale Impact</a></p><p><a href="https://medium.com/airbnb-engineering/a-deep-dive-into-airbnbs-server-driven-ui-system-842244c5f5">Airbnb</a>:</p><p><a href="https://medium.com/airbnb-engineering/a-deep-dive-into-airbnbs-server-driven-ui-system-842244c5f5">A deep dive into Airbnb’s server-driven UI system</a></p><p><strong>How do you adopt Server Driven UI? Like Tinder, Reddit, Airbnb?</strong></p><p>Lets continue the discuss here in part 2 of the series:</p><p><a href="https://medium.com/androidiots/mastering-sdui-a-deep-dive-into-server-driven-ui-8329ad90ab44">Mastering SDUI: A Deep Dive into Server-Driven UI</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=372a71c9c362" width="1" height="1" alt=""><hr><p><a href="https://medium.com/androidiots/understanding-client-driven-ui-limitations-and-the-rise-of-server-driven-ui-372a71c9c362">Understanding Client Driven UI: Limitations and the Rise of Server Driven UI</a> was originally published in <a href="https://medium.com/androidiots">AndroIDIOTS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering SDUI: A Deep Dive into Server-Driven UI]]></title>
            <link>https://medium.com/androidiots/mastering-sdui-a-deep-dive-into-server-driven-ui-8329ad90ab44?source=rss----eea095bae2c2---4</link>
            <guid isPermaLink="false">https://medium.com/p/8329ad90ab44</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[articles]]></category>
            <dc:creator><![CDATA[Anupam Singh]]></dc:creator>
            <pubDate>Fri, 29 Dec 2023 12:19:38 GMT</pubDate>
            <atom:updated>2024-07-05T14:09:58.559Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is Server-Driven UI (SDUI)?</h3><p>If you ask GPT this it what it spits out</p><blockquote>Server-Driven UI is a revolutionary paradigm shift in mobile app development. Unlike traditional approaches where the client-side dictates the app’s appearance and behavior, SDUI empowers the server to control these aspects. In simpler terms, the server becomes the mastermind behind the app’s user interface.</blockquote><p>In the part 1 of this series</p><p><a href="https://medium.com/androidiots/understanding-client-driven-ui-limitations-and-the-rise-of-server-driven-ui-372a71c9c362">Understanding Client Driven UI: Limitations and the Rise of Server Driven UI</a></p><p>we will use Bytes, a short 3 page app, of landing screen, category screen and article screen to explain the concept of SDUI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IRdx9ZfQp7McAVuQ" /><figcaption>Bytes : landing page, category, articles</figcaption></figure><h3><strong>What is a Mobile App in SDUI?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pgsNHpQw4vCGpDRN" /></figure><p>In the realm of Server-Driven User Interface (SDUI), a mobile app(or any frontend for that matter) can be viewed as a combination of two core components: User Interface (UI) and Logic, which can be further subdivided as follows:</p><p><strong>User Interface (UI):</strong><br>The visual layer of SDUI is composed of several building blocks:</p><p><strong>UI Components:</strong> These building blocks include buttons, forms, and interactive elements, all expertly orchestrated by the server for dynamic rendering.</p><p><strong>Tokens and Values</strong>: Tokens play a vital role, representing essential pieces of information needed for secure communication with the server. They encompass color tokens, typography tokens, spacing tokens, and other data crucial for personalized content retrieval.</p><p><strong>Spatial Arrangement:</strong> Spatial considerations revolve around the positioning and layout of UI elements on the mobile app’s screen. The server assumes control of this spatial arrangement to ensure an organized and user-friendly interface.</p><p><strong>Logic:</strong><br>The Logic component of the mobile app can be further divided into two primary aspects:</p><p><strong>1.UI Logic:</strong> client-side ui logic is responsible for managing user interactions such as button clicks or form submissions. For example, when a user taps the “Submit” button on a registration form, the UI logic validates the input data, generates an HTTP request to the server, and displays a success message upon a successful response.</p><p><strong>2.Business Logic:</strong> Business logic, a fundamental component, can be segmented into two critical facets:</p><p><strong>a. Actions:</strong> Actions encompass the execution of specific tasks or operations within the app, often instigated by user actions. These actions, in turn, trigger requests to the server, leading to updates or data retrieval. For instance, when a user clicks the “Purchase” button, it triggers an action that communicates with the server to complete the transaction and update the user’s account balance.</p><p><strong>b. Rules:</strong> Rules consist of predefined conditions and logic set by the server, governing the behavior of the app’s UI. These rules are instrumental in ensuring consistency, safeguarding data integrity, and delivering a seamless user experience. For example, a rule could dictate that a user who is a member of the platform will see different pricing than a non-member.</p><h3>What is SDUI system ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-Q7W20t4fz3G7OQV" /><figcaption>In SDUI : Server takes the front role in frontend development</figcaption></figure><p>A Server-Driven User Interface (SDUI) system is an architectural approach where the responsibility for presentation and user interface rendering is shifted from the client-side (mobile app or web browser) to the server-side. In this system, the server dynamically generates and controls various aspects of the user interface, including spatial layout, rendering, order of elements, logic, and values.</p><p><strong>How does a typical SDUI system looks like?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AdIX-Yz5l39t5FM1" /></figure><p>A Server-Driven User Interface (SDUI) system typically comprises several key components that work together to deliver dynamic and server-controlled user interfaces. Here’s an overview of these components:</p><p><strong>1.Design System: </strong>The design system defines the visual and interactive guidelines for the user interface, including elements like typography, colors, spacing, and UI components. It serves as the foundation for creating consistent and appealing UIs.</p><p><strong>2.SDUI JSON (JavaScript Object Notation):</strong> SDUI JSON is a structured data format used to describe UI elements, layout, content, and behavior. It allows the server to transmit instructions and data to the client app for rendering the user interface dynamically.</p><p><strong>3.Renderer: </strong>The renderer is responsible for interpreting and rendering the SDUI JSON received from the server. It translates the instructions in the JSON into actual UI elements and components displayed on the user’s device.</p><p><strong>4.Page UI:</strong> Page UI represents the user interface as it appears on the user’s screen. It consists of various UI components, such as buttons, forms, text fields, and images, organized according to the layout defined by the SDUI JSON.</p><p><strong>5.SDUI Backend Configuration:</strong> The SDUI backend configuration includes settings and rules that govern how the SDUI system operates. It specifies how the server should generate UIs, respond to user interactions, and handle data requests.</p><p><strong>6.Data Source:</strong> The data source provides the necessary data and content for the SDUI system. This may include user-specific information, real-time updates, product listings, or any other data needed to populate the UI components.</p><p><strong>7.BFF (Backend for Frontend) Layer:</strong> The BFF layer acts as an intermediary between the SDUI backend and the client app. It may perform tasks such as authentication, data aggregation, and request routing to ensure efficient communication between the client and server.</p><p>lets elaborate each part</p><h3><strong>What is Design System?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JwCM8cSptTqKjCmh" /></figure><p>A design system typically consists of:</p><p><strong>1.Typography:</strong> Typography is a foundational element that defines fonts, font sizes, line spacing, and text styles used throughout the UI. It ensures readability and maintains a cohesive visual identity.</p><p><strong>2.Color Tokens:</strong> Color tokens represent a set of predefined colors used consistently in the UI. They include primary and secondary color schemes, background colors, text colors, and other variations. Color tokens allow for easy theming and brand consistency.</p><p><strong>3.UI Components: </strong>UI components are the fundamental building blocks of the user interface. They encompass buttons, forms, input fields, checkboxes, and other interactive elements, each designed with specific styles and interactions defined by the design system.</p><p><strong>4.Spacing and Layout:</strong> Guidelines for spacing, margins, padding, and grid layouts help maintain alignment and visual hierarchy in the UI. These rules contribute to a structured and balanced user experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ICNc5SYKWyks02g5" /><figcaption>bytes design system</figcaption></figure><h3>What is <strong>SDUI JSON</strong>?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YHoLsLvQzLLBq7QL" /></figure><p>SDUI JSON (Server-Driven User Interface JSON) is a structured data format used for defining and controlling a user interface. It enables dynamic UI updates through server-client communication. Here are the main aspects:</p><p><strong>UI Elements:</strong> Describes components like buttons, images, and their properties.<br><strong>Layout: </strong>Specifies the arrangement and positioning of elements.<br><strong>Data Binding:</strong> Connects UI components to real-time data sources.<br><strong>Interaction:</strong> Defines how elements respond to user actions.<br><strong>Styling:</strong> Includes themes, colors, and visual properties.<br><strong>Navigation:</strong> Guides user movement between screens.<br><strong>Logic and Rules:</strong> Implements business logic and behavior.<br><strong>Responsiveness:</strong> Ensures adaptability to different devices.<br><strong>Localization:</strong> Supports multiple languages and regions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cwIc4W0PFslJTsQU" /></figure><h3>What is Renderer?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nAFjQrF2Q3HOiFlE" /></figure><p>A Renderer is a key component responsible for interpreting and transforming SDUI JSON (JavaScript Object Notation) data received from the server into a fully rendered and interactive user interface on the client-side, such as a mobile app or web application.</p><p>Here’s how a renderer functions within an SDUI system:</p><p><strong>Receiving SDUI JSON:</strong> The renderer receives SDUI JSON data from the server. This JSON contains instructions, data, and configurations for rendering the user interface.</p><p><strong>Interpreting SDUI JSON:</strong> The renderer interprets the SDUI JSON, understanding the structure and content of the UI elements, their layout, behavior, and any associated data bindings.</p><p><strong>Generating UI Components:</strong> Based on the SDUI JSON instructions, the renderer generates the actual user interface components, including buttons, text fields, images, and more. It applies the defined styling and layout rules to create a visually coherent UI.</p><p><strong>Data Binding:</strong> The renderer establishes data bindings, connecting UI components to real-time data sources or dynamic content specified in the SDUI JSON. This ensures that the UI displays up-to-date information.</p><p><strong>Handling User Interactions:</strong> Interactive components within the rendered UI, such as buttons and forms, are equipped with event listeners and logic to respond to user interactions, such as clicks or input submissions.</p><p><strong>Displaying the UI: </strong>The renderer displays the fully rendered and interactive user interface on the user’s device screen, allowing users to interact with the application as intended.</p><p><strong>Dynamic Updates: </strong>As the server can send updated SDUI JSON at any time, the renderer is designed to handle dynamic updates, ensuring that the UI reflects changes in real-time data or instructions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_kX3f5cNmAPpG7zd" /></figure><h3>What is Page UI?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Y11I1_9nY8LCYbHU" /></figure><p>Page UI refers to the user interface that is generated and displayed on the client-side based on the instructions and data received from the server. It represents the actual visual layout and components that users interact with when using a mobile app or web application.</p><p>Here are key characteristics of Page UI in SDUI:</p><p><strong>Dynamic Generation:</strong> Page UI is dynamically generated based on the SDUI JSON (JavaScript Object Notation) instructions received from the server. These instructions define the structure, layout, content, and behavior of the user interface.</p><p><strong>User-Facing Elements:</strong> Page UI includes all the user-facing elements and components of the application, such as buttons, forms, text fields, images, menus, and any other interactive or informational elements.</p><p><strong>Layout and Styling:</strong> The layout and styling of Page UI are determined by the instructions provided in the SDUI JSON. This includes specifying how elements are positioned, their sizes, margins, padding, colors, fonts, and other visual attributes.</p><p><strong>Data Binding: </strong>Page UI is often populated with real-time data through data binding. Data bindings connect UI components to data sources, ensuring that the displayed content is up-to-date and reflects changes on the server.</p><p><strong>Interactivity: </strong>Interactive elements within the Page UI, such as buttons, links, and input fields, are designed to respond to user actions. Event handling and user interaction logic are defined to provide a responsive and intuitive user experience.</p><p><strong>Navigation: </strong>Page UI may also include navigation elements, such as menus, tabs, or buttons that allow users to move between different screens or sections of the application.</p><p><strong>Real-Time Updates:</strong> Page UI is capable of receiving real-time updates from the server. This enables dynamic changes to the UI without requiring users to manually refresh the application</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HCmTM3b_MclaTTwe" /></figure><h3>What is SDUI Config?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LBqUoTITAarYeImr" /></figure><p>In SDUI , the configuration or SDUI config encompasses various components:</p><p><strong>Page Level Unresolved Config:</strong> This facet involves page-level settings that may incorporate dynamic or unresolved elements. It allows for conditional behavior, flexible styling, and data binding based on real-time conditions.</p><p><strong>Skeleton of Components: </strong>SDUI config serves as a foundational blueprint, defining the initial arrangement of UI components on a page. This structural ‘skeleton’ sets the stage for the user interface layout.</p><p><strong>Static Component Values: </strong>For UI elements with unchanging values, the config provides a straightforward specification. For instance, it can define default button labels, like ‘Submit,’ ensuring consistency.</p><p><strong>Static Component Action:</strong> Similarly, static actions for UI components are defined. This includes specifying default actions triggered by user interactions, irrespective of dynamic variables.</p><p><strong>Contains Reference to Values to be Resolved:</strong> The configuration may include references to values awaiting resolution at runtime. These references depend on conditions, user attributes, or dependencies. An example could be determining text color based on a user’s membership status.</p><p><strong>Saved Config: </strong>SDUI config can be saved and versioned, allowing for change tracking and rollback capabilities. This ensures that historical records of config modifications are maintained.</p><p>Example: A config which works for membership</p><pre>{<br>  &quot;page&quot;: &quot;User Profile Page&quot;,<br>  &quot;layout&quot;: {<br>    &quot;structure&quot;: &quot;2-column layout&quot;,<br>    &quot;components&quot;: [<br>      {<br>        &quot;type&quot;: &quot;Image&quot;,<br>        &quot;source&quot;: &quot;user-avatar.jpg&quot;,<br>        &quot;position&quot;: &quot;left-column&quot;<br>      },<br>      {<br>        &quot;type&quot;: &quot;Text&quot;,<br>        &quot;content&quot;: &quot;Welcome, [UserName]!&quot;,<br>        &quot;position&quot;: &quot;right-column&quot;<br>      }<br>    ]<br>  },<br>  &quot;dynamicConfig&quot;: [<br>    {<br>      &quot;element&quot;: &quot;Text&quot;,<br>      &quot;property&quot;: &quot;content&quot;,<br>      &quot;value&quot;: &quot;Hello, [UserName]!&quot;,<br>      &quot;condition&quot;: {<br>        &quot;ifUserIsMember&quot;: {<br>          &quot;value&quot;: &quot;Welcome, [UserName]!&quot;,<br>          &quot;elseValue&quot;: &quot;Join now and enjoy exclusive benefits!&quot;<br>        }<br>      }<br>    },<br>    {<br>      &quot;element&quot;: &quot;Image&quot;,<br>      &quot;property&quot;: &quot;source&quot;,<br>      &quot;value&quot;: &quot;premium-avatar.jpg&quot;,<br>      &quot;condition&quot;: {<br>        &quot;ifUserIsMember&quot;: true<br>      }<br>    }<br>  ],<br>  &quot;generatedBy&quot;: &quot;Admin Dashboard&quot;,<br>  &quot;savedConfig&quot;: &quot;v1.2&quot;,<br>  &quot;description&quot;: &quot;Config for the user profile page&quot;<br>}</pre><h3><strong>What is DataSource?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VO3jwj3ZIQ11V7WS" /></figure><p>A datasource in the context of Server-Driven User Interface (SDUI) is essentially the source of data for your application. It could be a database like MySQL or MongoDB, an API, or any other data store that provides information to populate your app’s user interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/0*xcWn3fDcxMfEmm44" /><figcaption>Any datasource works in SDUI</figcaption></figure><h3><strong>What is BFF Layer?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4TmD9Yjci607u-ug" /></figure><p>BFF (Backend For Frontend): Abbreviated as BFF, which stands for “Backend for Frontend,” the BFF layer serves as an intermediary layer specifically designed to cater to the frontend’s needs in an SDUI architecture.</p><p><strong>Hydration from SDUI Page Config:</strong> Within the BFF layer, all UI components are “hydrated” or populated with data from the SDUI page configuration. This means that the SDUI page config, which defines the structure and behavior of the user interface, is used to populate UI components with the necessary data.</p><p><strong>Dynamic Reference Resolution: </strong>The BFF layer is responsible for resolving dynamic references at runtime. This involves retrieving data from database values and referencing SDUI component configurations and logic to ensure that the UI elements are updated with the most current and relevant information.</p><p><strong>Extra Business Logic:</strong> In addition to data retrieval and reference resolution, the BFF layer can incorporate extra business logic specific to the frontend’s requirements. This logic can include validation checks, order adjustments, experiments, and personalization features that enhance the frontend’s functionality and user experience.</p><h3><strong>Do we understand SDUI System?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YyWCn9ptFQI3XGsH" /><figcaption>Phew that took forever</figcaption></figure><h3><strong>What are the Use Cases of SDUI system?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JClX6Nwg_vDsnMY2" /></figure><p>Internet-Driven Pages: SDUI is well-suited for web applications, websites, and mobile apps that rely on real-time data and content updates from the internet. Examples include news websites, social media platforms, and e-commerce sites where content needs to be frequently refreshed without requiring app updates.</p><p>Content-Rich Apps: Applications that serve a wide range of content, such as news articles, images, videos, or product listings, can benefit from SDUI. It enables seamless content updates, personalized recommendations, and dynamic user experiences.</p><h3><strong>SDUI : Any Other Benefits?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/0*ZsgCbGRZdjxuFTjv" /></figure><p><strong>A/B Testing:</strong> SDUI enables seamless A/B testing and experimentation. Different UI configurations, content variations, or feature flags can be dynamically applied to specific user segments without the need for app updates. This allows for data-driven decision-making and optimization of user experiences.</p><p><strong>Easy Configurations using Remote Configs at BFF Layer:</strong> Remote configuration management becomes simplified with SDUI. Changes to UI behavior, styling, or content can be managed centrally at the BFF (Backend For Frontend) layer, allowing for rapid adjustments without deploying new app versions.</p><p><strong>Personalization: </strong>SDUI empowers applications to deliver personalized content and experiences to users. Data-driven insights can be used to customize UI elements, recommendations, and user journeys based on individual preferences and behavior.</p><p><strong>Leveraging BFF Layer and Pre-Processing of Data:</strong> The BFF layer in SDUI can preprocess and optimize data before it reaches the client, reducing the workload on the client-side and enhancing overall performance. Data can be transformed, aggregated, or enriched to match the frontend’s specific needs.</p><p><strong>New Pages Instantaneously: </strong>With SDUI, it’s possible to introduce entirely new pages or views instantly without the need to ship code updates to the app stores. If the same UI components are reused, the configuration can be adjusted to create new pages dynamically.</p><p><strong>Consistency Across Platforms:</strong> SDUI promotes UI consistency across different platforms, including web, Android, and iOS. By defining UI components and behavior on the server side, the same user experience can be maintained across various devices and operating systems.</p><p><strong>Release Management:</strong> SDUI simplifies the release management process. Updates, fixes, and enhancements can be implemented on the server side without requiring users to download and install new app versions. This streamlines the release cycle and reduces user friction.</p><p><strong>Rollback Faulty Releases:</strong> In the event of issues or bugs in a release, SDUI allows for quick rollbacks. The server configuration can be reverted to a previous state, ensuring that users have a stable and reliable experience while issues are addressed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EcQ8uxTXvJP5ojHjx6Ugmw.png" /></figure><h3>Are there any challenges with SDUI?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Wj2voz5oOZcGgTyp" /></figure><p>while Server-Driven User Interface (SDUI) offers various advantages, it also presents certain challenges and considerations that developers and organizations should be aware of:</p><p><strong>Complexity at Backend:</strong> Implementing SDUI can introduce complexity at the backend, particularly when managing dynamic UI configurations, data processing, and handling various client requests. It requires robust server infrastructure and logic.</p><p><strong>Backward Compatibility: </strong>Maintaining backward compatibility with older versions of the client app can be challenging when making changes to SDUI configurations. Ensuring a smooth transition for existing users is essential.</p><p><strong>Versioning to Prevent Errors: </strong>Effective version control and management are crucial to prevent errors and inconsistencies in SDUI configurations. Different levels of versioning may be needed, including component level, BFF level, SDUI config level, and app version level.</p><p><strong>Accessibility: </strong>Ensuring accessibility for users with disabilities is essential, especially for large-scale consumer apps. SDUI implementations need to adhere to accessibility standards to provide an inclusive user experience.</p><p><strong>Load Time: </strong>SDUI configurations, particularly when complex, can impact app load times. Optimizing the delivery and processing of SDUI data is necessary to maintain a responsive user experience.</p><p><strong>Modularization:</strong> Breaking down the UI into modular components can be challenging but is essential for SDUI flexibility. Proper modularization allows for reusability and scalability.</p><p><strong>Development and Maintenance:</strong> Developing and maintaining SDUI configurations, especially in large and evolving applications, can require ongoing effort and resources. It’s essential to have processes in place for efficient development and updates.</p><h3>Anyone Uses it?</h3><p>Yes, Server-Driven User Interface (SDUI) is on the rise, and an increasing number of companies are adopting this approach to enhance the flexibility and efficiency of their applications. Here are a few examples of companies that have embraced SDUI:</p><p>Reddit:</p><p><a href="https://www.infoq.com/news/2023/09/reddit-feed-server-driven-ui/">Reddit Adopts Server-Driven UI for Its New Feed Architecture across Mobile Apps</a></p><p>Tinder:</p><p><a href="https://medium.com/tinder/how-tinder-solves-complex-lottie-localizations-with-server-driven-ui-e307c6bab137">How Tinder Solves Complex Lottie Localizations with Server Driven UI</a></p><p>Robinhood:</p><p><a href="https://medium.com/robinhood-engineering/how-server-driven-ui-is-helping-frontend-engineers-scale-impact-c7dce0c20064">How Server Driven UI is Helping Frontend Engineers Scale Impact</a></p><p><a href="https://medium.com/airbnb-engineering/a-deep-dive-into-airbnbs-server-driven-ui-system-842244c5f5">Airbnb</a>:</p><p><a href="https://medium.com/airbnb-engineering/a-deep-dive-into-airbnbs-server-driven-ui-system-842244c5f5">A deep dive into Airbnb’s server-driven UI system</a></p><h3><strong>Can i ever use SDUI?</strong></h3><p>What do Tinder, Reddit, Robinhood, and Airbnb have in common?</p><p>They shared a combination of resources: <strong>Time</strong>, <strong>Money</strong>, and <strong>Expertise</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZR62821t6yuLQCWzaPgKVQ.png" /><figcaption>Time , Money and Expertise is all you need to build an SDUI system</figcaption></figure><p>So question how can anyone use SDUI it they dont have all 3??</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9mzFPzYmi1LI0S8N" /><figcaption>access to SDUI a loosing battle??</figcaption></figure><h3><strong>That is why we built Digia</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8-UN9fVUlIdxF7v4" /></figure><p>We recognized that not everyone has the resources or expertise to implement a Server-Driven User Interface (SDUI) system. That’s why we developed Digia, a mobile app development platform. With Digia, anyone can harness the capabilities of an SDUI system, making dynamic and responsive mobile app development accessible to a wider audience</p><p>Check it out at <a href="https://www.digia.tech/">here</a></p><p><a href="https://www.digia.tech/">Home | Digia</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8329ad90ab44" width="1" height="1" alt=""><hr><p><a href="https://medium.com/androidiots/mastering-sdui-a-deep-dive-into-server-driven-ui-8329ad90ab44">Mastering SDUI: A Deep Dive into Server-Driven UI</a> was originally published in <a href="https://medium.com/androidiots">AndroIDIOTS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The missing dev tools in Android Apps]]></title>
            <link>https://medium.com/androidiots/the-missing-dev-tools-in-android-apps-cc55e15782b2?source=rss----eea095bae2c2---4</link>
            <guid isPermaLink="false">https://medium.com/p/cc55e15782b2</guid>
            <category><![CDATA[chucker]]></category>
            <category><![CDATA[charles-proxy]]></category>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Tushar Gupta]]></dc:creator>
            <pubDate>Wed, 28 Dec 2022 12:38:59 GMT</pubDate>
            <atom:updated>2022-12-28T12:41:58.397Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>TL;DR</strong>: <a href="https://github.com/requestly/requestly-android-sdk">Requestly Android Debugger</a> lets you have the power 💪 of Charles &amp; Chucker together in your apps. It makes it super easy to debug APIs, Analytics events, Logs &amp; report issues on Android Apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/0*cOev8NoAHl550e1d.png" /></figure><h3>Problems with the current setup</h3><p>Right now there is no dev-tools panel available in Android Apps. To debug android apps, most people either connect to Android Studio or Charles Proxy. But both of these comes with their own challenges.</p><ul><li>Android Studio — Non-Devs (QA/PM..) can initially find this a little daunting. Plus Android Studio needs over 3000GBs of RAM 💻🔥.</li><li>Charles Proxy: No doubt a really helpful tool. But we are in 2022 now &amp; No one has time to install a certificate or set up a WIFI proxy to debug apps. Also, the UI/UX of Charles is 👴🏽.</li></ul><h3>Introducing Requestly Android Debugger</h3><p>Requestly Android Debugger adds the missing dev tools panel to your Android Debug Builds. It lets you have the power of Charles and Chucker in a single app and makes it super easy to debug APIs, Analytics Events &amp; report issues directly from your device.</p><p>It requires only a one-time integration and then it can be used company-wide (Yes, without installing certificates or setting wifi proxy)</p><p>Also, it is completely free and open-source <a href="https://github.com/requestly/requestly-android-sdk">https://github.com/requestly/requestly-android-sdk</a></p><h3>Features</h3><p>Here are some of the features that Requestly Android Debugger support:</p><h3>Network Traffic Debugger</h3><p>View &amp; debug your HTTP traffic directly from your device. You can see which requests are failing and send the faulty requests directly to the developer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/0*g_qSG6nZwIh1XRfh.png" /><figcaption>Debug Network API’s</figcaption></figure><h3>Analytics Events Debugger</h3><p>Debug &amp; validate your analytics events after every fix/release. PMs/QA can now verify what events are firing directly from your app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/0*mDnbkvu2d30j5XiN.png" /><figcaption>Debug Analytics Events</figcaption></figure><h3>Host Switcher 🔀</h3><p>Switch your API’s hosts between PROD ↔ STAGE ↔ DEV in a single click. No need to hardcode the URLs in your codebase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/0*SOoFr1NpiiNgBGvy.png" /><figcaption>Switch Environments</figcaption></figure><h3>Logs Viewer 🪵</h3><p>See your logcat logs directly from your app. No need to connect your device to your computer to know what’s happening inside your app. Check what crashed the app without opening Android Studio.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/0*YOGzkra7j9q2qxO-.png" /><figcaption>Debug Logcat</figcaption></figure><h3>Shared Preferences Editor (Coming Soon)</h3><p>See and modify the Shared Preference of the App directly from the device.</p><h3>Demo</h3><p>Check out some of the demo apps here.</p><p><strong>↓ Click on Screenshot to try the App ↓</strong></p><figure><a href="https://appetize.io/embed/ctumozxsaz6cj4wox36vjc7jwy?device=pixel6pro&amp;osVersion=12.0&amp;scale=75&amp;deviceColor=black"><img alt="" src="https://cdn-images-1.medium.com/max/375/1*LsAuTkoGGDZUSi8OsMX9-Q.png" /></a></figure><p><strong>OR</strong></p><ul><li><a href="https://github.com/requestly/android-debugger-examples/releases/latest/download/cryptodemo-debug.apk">Dowload CryptoDemo Apk</a></li><li><a href="https://github.com/requestly/android-debugger-examples/releases/latest/download/infinity-reddit-debug.apk">Download Infinity Reddit Apk</a></li><li><a href="https://github.com/requestly/android-debugger-examples/releases/latest/download/pokedex-debug.apk">Download Pokedex Apk</a></li></ul><p><strong>Check out more here</strong>: <a href="https://github.com/requestly/requestly-android-sdk">https://github.com/requestly/requestly-android-sdk</a></p><p>We are constantly working on improving this daily. If you liked what we are making, then please leave us a <a href="https://github.com/requestly/requestly-android-sdk">star</a> ⭐️ on our <a href="https://github.com/requestly/requestly-android-sdk">GitHub</a> repo.</p><p><em>Originally published at </em><a href="https://requestly.io/blog/the-missing-dev-tools-in-android-apps"><em>https://requestly.io</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc55e15782b2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/androidiots/the-missing-dev-tools-in-android-apps-cc55e15782b2">The missing dev tools in Android Apps</a> was originally published in <a href="https://medium.com/androidiots">AndroIDIOTS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Rewind :  2020]]></title>
            <link>https://medium.com/androidiots/android-rewind-2020-a89057375cb5?source=rss----eea095bae2c2---4</link>
            <guid isPermaLink="false">https://medium.com/p/a89057375cb5</guid>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[articles]]></category>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Anupam Singh]]></dc:creator>
            <pubDate>Thu, 31 Dec 2020 19:04:43 GMT</pubDate>
            <atom:updated>2021-01-01T08:57:43.601Z</atom:updated>
            <content:encoded><![CDATA[<h3>Android Rewind: 2020</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z67BAE7B9-Y7dNG7rvCRlQ.png" /></figure><p>2020 was a tough year for everyone, google I/O 2020 was canceled, iOS supports widgets now (cough cough…)</p><p>In wake of covid -19 with the entire world working remotely albeit juggling between work and home we hoped android might also take a break, but no the juggernaut that is Android kept rolling in 2020 as usual.</p><p>We don’t want you to get overwhelmed by the amount of stuff Google, Jet-brains shipped together in thousand of articles online, here is a rewind of android as it happened in 2020 (well, the good part only).</p><h3><strong>Android 11:</strong></h3><p>New year, New android.</p><p><a href="https://developer.android.com/about/versions/11">Android 11</a> in google’s words is</p><blockquote>People-centric and expressive, with a new controls space and more privacy features. Extend your apps with conversation notifications and bubbles, try one-time permissions, surface devices and media in the controls. Work faster with tools like compatibility toggles, ADB incremental installs, and more!</blockquote><p>With Android 11, Google has taken a step jump in enhancing the privacy of users. As a developer, you need to keep the following points in mind while building apps</p><ul><li><a href="https://developer.android.com/training/permissions/requesting#one-time">One Time Permissions</a>: Starting in Android 11, whenever your app requests permission related to location, microphone, or camera, the user-facing permissions dialog contains an option called <strong>Only this time</strong>. If the user selects this option in the dialog, your app is granted a temporaryÂ <em>one-time permission, </em>and if the user denies the permission multiple times it will be considered a ‘Don’t Ask Again’ and the system will not show the permission dialog anymore, the user would have to grant permission from the settings.</li><li><a href="https://developer.android.com/guide/topics/permissions/overview#auto-reset-permissions-unused-apps">Permission Auto-Reset</a> : If the user hasn’t interacted with apps for months system will remove sensitive permission access for these apps, to read best practices for request permission read <a href="https://developer.android.com/training/permissions/requesting">here</a></li><li><a href="https://developer.android.com/about/versions/11/privacy/storage#scoped-storage">Scoped Storage</a>: To give users more control over their files and to limit file clutter android introduced scoped storage in android 10 with android 11 its compulsory for all apps to use it.</li><li><a href="https://developer.android.com/about/versions/11/privacy/location#background-location">Background Location Access</a>: Now developers have to request background and foreground requests incrementally in separate calls.</li></ul><p>To enhance security Android 11 now uses SSL engine of <a href="https://github.com/google/conscrypt">Conscript</a>, and it used <a href="https://source.android.com/devices/tech/debug/scudo">Scudo Hardened Allocator</a> internally to service heap allocations. which is capable of detecting and mitigating memory safety violations and now users&#39; app usage stats are stored in <a href="https://source.android.com/security/encryption/file-based">credential encrypted storage</a>.</p><p>It also comes with a host of new features like chat bubble, support for waterfall screen, Media control settings, and much more find the details <a href="https://developer.android.com/about/versions/11/features">here</a>.</p><p>And in case confused about how to digest changes in Android 11 <a href="https://proandroiddev.com/the-quick-developers-guide-to-migrate-their-apps-to-android-11-e4ca2b011176">Here</a> is a guide by <a href="http://twitter.com/iamgoddamnbatman">@iamgoddamnbatma</a> on steps to Migrate to Android 11 easily.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FfnkFOhA7FC4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DfnkFOhA7FC4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FfnkFOhA7FC4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fb7b7b3e426d0e9ddfc50655f4721b38/href">https://medium.com/media/fb7b7b3e426d0e9ddfc50655f4721b38/href</a></iframe><h3>Android Jetpack And More :</h3><ul><li><a href="https://developer.android.com/jetpack/compose/tutorial">Jetpack Compose</a>: An Android UI toolkit, taking inspiration declarative programming paradigm from the web, android now supports a new way of writing android UI say bye-bye to messy XML files and bloated adapters.<br>Read <a href="https://medium.com/androiddevelopers/understanding-jetpack-compose-part-1-of-2-ca316fe39050">Here</a> to understand the power of composition Compose uses.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FU5BwfqBpiWU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DU5BwfqBpiWU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FU5BwfqBpiWU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/50ddb9260b7edfe14d32a000083d9dc1/href">https://medium.com/media/50ddb9260b7edfe14d32a000083d9dc1/href</a></iframe><ul><li><a href="https://developer.android.com/training/dependency-injection/hilt-android">Dagger Hilt</a>: Finally google has an opinionated way of using dependency injection in android with dagger hilt, hilt simplifies the overall infra for using dagger with standard components and scopes it eases the pain of setup, readability, and testing. Read <a href="https://dagger.dev/hilt/">here</a> to deep dive into Hilt.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FB56oV3IHMxg&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DB56oV3IHMxg&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FB56oV3IHMxg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/386d85837f2fa929ce2fefc8af4b6de2/href">https://medium.com/media/386d85837f2fa929ce2fefc8af4b6de2/href</a></iframe><ul><li><a href="https://developer.android.com/topic/libraries/architecture/datastore">Data Store</a>: Now you can store key-value pairs and typed objects locally in disk memory, data store is a replacement of Shared Preference Api it also leverages Kotlin Coroutines to store data asynchronously and consistently, so no more headache to synchronize apply and commit.</li><li><a href="https://developer.android.com/guide/navigation/navigation-swipe-view-2">View Pager 2</a>: Built on top of recycler view, the new view pager API has a stable version now, <a href="https://developer.android.com/training/animation/vp2-migration">here</a> is a guide to help you migrate from the old view pager.</li><li><a href="https://developer.android.com/reference/android/os/AsyncTask">Async Tasks </a>Deprecated in Android 11: Finally some good news to all people who grew up loving to hate this API, some versions had Some versions have parallel execution and some have sequential execution with the special attention needed to not to leak memory limitation of execute() will be only be called from the main thread, the async task had it coming, so now what? well we have <a href="https://kotlinlang.org/docs/reference/coroutines-overview.html">kotlin coroutines</a> for the rescue</li><li><a href="https://medium.com/androiddevelopers/introducing-constraint-layout-2-0-9daa3e99995b">Constraint Layout 2.0</a>: With Flow, a new virtual layout for building chains, Layer, a helper to create virtual layers from several views, and first-class support of motion layout along with motion editor, constraint layout is now even more powerful.</li><li><a href="http://StateFlow and SharedFlow in Kotlin">State Flow And Shared Flow</a>: Data transfer is the bedrock of software development, and to enhance the existing infra of data communication android now has new APIs in <a href="https://developer.android.com/kotlin/flow">Kotlin Flow</a>s. State flow updates the current and new state of data to its collector, and it stays in memory as long as the flow is collected by any collector, Shared flow is a configuration on top of state flow and it emits values to all the collectors that collect from it.</li><li><a href="https://developer.android.com/topic/libraries/architecture/paging/v3-overview">Paging 3</a>: With first-class support for Kotlin Coroutines and Flow, built-in error and load state for Responsive UI, and improved repository and presentation layer, paging 3 is now even more powerful than ever, are you already using paging 2 and above features are enticing enough to update have a read <a href="https://medium.com/@tantzewee/android-jetpack-migrating-from-paging-2-0-to-paging-3-0-c1caddad072d">here</a>, though paging 3 is currently in alpha so no rush as such.</li><li><a href="https://developer.android.com/topic/libraries/app-startup">Jetpack App Startup</a>: Every enterprise app has a lot of 3rd party dependencies eg Work Manager, FirebaseApp and these components need to be initialized before Application.onCreate() and content providers to initialize each dependency separately is the way to go about it till now, and obviously, it comes with the cost of time consumed to initialize every dependency independently, App Startup lets you define initializers that share a single content provider. This significantly improves app startup time, usually by ~2ms per content provider.</li><li><a href="https://developer.android.com/reference/androidx/activity/result/package-summary">Activity Result Api</a>: Since the Inception of android we have been communicating between two activities bypassing Intent and requestCode through startActivityForResult , we check the request and result code before paring response on onActivityResult , but when the app grows there is a lot of tight coupling in a lot of if cases and becomes very difficult to test, the new Activity Result API which is part of the AndroidX library suite comes with a good abstraction that allows us yo handle onActivityResult() the method in a clean and reusable structure, you can register a callback for an Activity Result, The Activity Result APIs provide components for registering for a result, launching the result, and handling the result once it is dispatched by the system.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FR3caBPj-6Sg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DR3caBPj-6Sg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FR3caBPj-6Sg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb59a2702e462133517e13dbf52c399e/href">https://medium.com/media/cb59a2702e462133517e13dbf52c399e/href</a></iframe><h3>Kotlin:</h3><p>Jetbrains has been very active even during these tough times and shipped new features for Kotlin all year round.</p><p>In March, <strong>Kotlin</strong> <strong>1.3.70</strong> came out with these new changes:</p><ul><li><a href="http://twitter.com/OptIn">@</a>OptIn and @RequiresOptIn have replaced @UseExperimental and @Experimental</li><li>Double-ended queue implementation: ArrayDeque</li><li>Collection builders: buildList, buildSet, and buildMap which work similar to buildString</li><li>Scanning Lists and Sequences: scan() is closely related to fold(). Both scan() and fold() apply the given binary operation to the sequence of values, but differ in that scan() returns the whole sequence of intermediate results, while fold() returns only the final result.</li></ul><p><strong>Kotlin 1.4.0</strong> was released in August with a focus on Quality and Performance, with these new updates:</p><ul><li><a href="https://kotlinlang.org/docs/reference/whatsnew14.html#new-functions-for-arrays-and-collections">New functions for arrays and collections</a></li><li>StringBuilder has useful new extension functions: set(), setRange(), deleteAt(), deleteRange(), appendRange(), and others.</li><li>New functions for bit manipulations: countOneBits() ,countLeadingZeroBits() ,countTrailingZeroBits() , takeHighestOneBit() , takeLowestOneBit() , rotateLeft() and rotateRight()</li><li><a href="https://kotlinlang.org/docs/reference/whatsnew14.html#using-break-and-continue-inside-when-expressions-included-in-loops">Using break and continue inside when in loops</a></li><li><a href="https://kotlinlang.org/docs/reference/whatsnew14.html#mixing-named-and-positional-arguments">Mix named and positional arguments</a> when calling a function</li><li>Support for <a href="https://kotlinlang.org/docs/reference/whatsnew14.html#trailing-comma">Trailing commas</a></li><li>More support for <a href="https://kotlinlang.org/docs/reference/whatsnew14.html#callable-reference-improvements">callable references</a>.</li></ul><p>In the most recent release,<strong> Kotlin 1.4.21</strong>, the major update was the deprecation of kotlin-android-extensions. We’ve all used this library for synthetic views from, and @Parcelize annotation has become our go-to, to avoid writing lots of boilerplate when implementing parcelable’s. Synthetic views are no longer needed since the Android team introduced view-binding (<a href="https://developer.android.com/topic/libraries/view-binding/migration">migration guide</a>), so Jetbrains decided to deprecate it, and move @Parcelize to its own kotlin-parcelize package.</p><h3>Android Studio</h3><h4><a href="https://developer.android.com/studio/releases#3-6-0">Studio 3.6</a></h4><ul><li><a href="https://developer.android.com/studio/releases#3.6-split-view-zoom">Split view</a> in design editors to see Code + Design</li><li><a href="https://developer.android.com/studio/releases#3.6-color-picker-resource-tab">Color Picker Resource Tab</a> to easily pick colors in scope.</li><li>Updates to the Android Gradle plugin: <a href="https://developer.android.com/studio/releases#3.6-view-binding">View Binding</a></li><li>Apply changes: You can now add a class and then deploy that code change to your running app by clicking either <strong>Apply Code Changes</strong> or <strong>Apply Changes and Restart Activity</strong>.</li><li><a href="https://developer.android.com/studio/releases#apk_analyzer">Deobfuscate class and method bytecode in APK Analyzer</a></li><li><a href="https://developer.android.com/studio/releases#3.6-profiler-memory-leak-detection">Leak Detection in Memory Profiler</a>: When you capture/import a heap dump, the profiler can now flag instances in the heap which might be memory leaks.</li><li>Emulators: <a href="https://developer.android.com/studio/releases#improved_location_support">Improved location support</a>, <a href="https://developer.android.com/studio/releases#multi-display_support">Multi-display support</a></li><li>Resumable SDK downloads</li><li>Gradle offline toggle on Gradle tool window</li><li>Win32 is deprecated</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fh7dCm2lQLOg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dh7dCm2lQLOg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fh7dCm2lQLOg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8f95943ebb11d680ac67a62225c9f2d/href">https://medium.com/media/f8f95943ebb11d680ac67a62225c9f2d/href</a></iframe><h4><a href="https://developer.android.com/studio/releases#3-6-0">Studio 4.0</a></h4><ul><li><a href="https://developer.android.com/studio/releases#4-0-0-build-analyzer">Build Analyser</a>: Understand and diagnose issues with your build processes, such as disabled optimizations and improperly configured tasks. The window organizes the possible build issues in a tree on the left and a more detailed description on the right.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OyZZ2Rzg-5qqIByc.png" /></figure><ul><li><a href="https://developer.android.com/studio/releases#4-0-0-desugar">Java 8 library desugaring in D8 and R8</a>: Android Studio now includes support for using a number of Java 8 language APIs without requiring a minimum API level for your app.</li><li><a href="https://developer.android.com/studio/releases#4-0-0-feature-plugin">Feature-on-feature dependencies</a>: Feature modules can now depend on other feature modules. This means that when your app requests to download a feature module, the app also downloads other feature modules it depends on. You can enable this in-studio from <strong>Help &gt; Edit Custom VM Options</strong>.</li><li><a href="https://developer.android.com/studio/releases#4-0-0-dependency-metadata">Dependencies metadata</a>: When compiling your app with Android Gradle Plugin 4+, a summary of dependencies is stored in build/outputs/sdk-dependencies/release/sdkDependency.txt which PlayStore uses to give alerts and actionable feedbacks on known issues of the SDKs you use.</li><li>Support for Kotlin DSL script files: The Android Gradle plugin now supports Kotlin DSL build script files (*.kts).</li><li><a href="https://developer.android.com/studio/releases#cpu-profiler-upgrades">CPU Profiler Updates</a>: Error rates are decreased and UI is much more intuitive. CPU recordings are separated from the main timeline for easier analysis and has many more options such as viewing thread activities, flame chart, top-down and bottom-up, etc.</li><li><a href="https://developer.android.com/studio/releases#4-0-0-motion-editor">New Motion Editor</a>: You can now preview your MotionLayout animations in the design editor. You can move your objects, define states, play the animation in the editor and it’ll automatically generate the corresponding XML code for you!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yUdFP2XrNMbasvwq.gif" /></figure><ul><li><a href="https://developer.android.com/studio/releases#4-0-0-live-layout-inspector">Live Layout Inspector</a>: Debug your layout with an updated Live Layout Inspector that provides complete, real-time insights into your app’s UI while it’s deployed to a device. You can see the dynamic layout hierarchy, resolved properties, a 3D view which is especially helpful with view pagers.</li><li><a href="https://developer.android.com/studio/releases#4-0-0-smart-code-shrinker-rules">Smart editor features for code shrinker rules</a>: With R8 getting stable, the studio got smarter with features like syntax highlighting, code completion, and error checking for rules.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Ff1fHPqAYj5I%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Df1fHPqAYj5I&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Ff1fHPqAYj5I%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/aaf17a7b01073e1750389f069b09ee82/href">https://medium.com/media/aaf17a7b01073e1750389f069b09ee82/href</a></iframe><h4><a href="https://developer.android.com/studio/releases#4-1-0">Studio 4.1</a></h4><ul><li><a href="https://developer.android.com/studio/releases#4.1-database-inspector">New Database Inspector</a>: It’s finally here! The long-awaited database inspector lets you inspect, query, and modify your databases in your running app using the new Database Inspector.</li><li><a href="https://developer.android.com/studio/releases#run-emulator-studio">Run the Android Emulator directly in Android Studio</a>: A lot of devs disliked how they had to switch between emulator and studio all the time, breaking their workflow.</li><li><a href="https://developer.android.com/studio/releases#4.1-tensor-flow-lite-models">Use TensorFlow Lite models</a>: ML Model binding for .tflite models help in generating easy-to-use classes for you to interact with.</li><li><a href="https://developer.android.com/studio/releases#4.1-native-memory-profiler">Native Memory Profiler</a>: If the studio is connected with a device running Android 10 and above, the studio allows you to record memory allocations and deallocations from native code and inspect cumulative statistics about native objects</li><li><a href="https://developer.android.com/studio/releases#dagger-navigation">Dagger navigation support</a>: Now you can navigate between your Dagger-related code by providing new gutter actions and extending support in the <strong>Find Usages</strong> window</li><li><a href="https://developer.android.com/studio/releases#mdc-templates">Material Design Components</a>: Updated themes and styles in new project templates depending on material design and conforming to its guidelines.</li></ul><h3>Honorable Mention: Firebase</h3><p>Firebase has shipped some major releases this year, with the most notables ones being :</p><ul><li>Bye Bye Fabric: Fabric SDK has been officially deprecated since 18th November and crashes will now be reported with firebase’s crashlytics sdk.</li><li><a href="https://firebase.google.com/docs/android/learn-more#bom">Firebase Android BoM</a>: The Firebase Android BoM (Bill of Materials) enables you to manage all your Firebase library versions by specifying only one version — the BoM’s version. Super useful as it ensures that all your firebase sdk dependencies are inter-compatible.</li></ul><p>We believe this rewind was useful we are also inviting Android Developers across the globe to contribute back to the community via AndroIDIOTS. If you are interested in recording a podcast or writing tech articles, we would love to have you on board. <a href="https://androidiots.typeform.com/to/RbWDKC"><strong><em>Here</em></strong></a> is a small form you can fill so we can get back to you.</p><p><strong>Happy New Year 2021, Cheers !!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a89057375cb5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/androidiots/android-rewind-2020-a89057375cb5">Android Rewind :  2020</a> was originally published in <a href="https://medium.com/androidiots">AndroIDIOTS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AndroIdiots Podcast E18: Custom Lints]]></title>
            <link>https://medium.com/androidiots/androidiots-podcast-e18-custom-lints-349f0651d458?source=rss----eea095bae2c2---4</link>
            <guid isPermaLink="false">https://medium.com/p/349f0651d458</guid>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[podcast]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android-studio]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Anupam Singh]]></dc:creator>
            <pubDate>Mon, 20 Jul 2020 08:57:00 GMT</pubDate>
            <atom:updated>2020-07-27T06:49:20.776Z</atom:updated>
            <content:encoded><![CDATA[<h3>AndroIdiots Podcast E18: Custom Lints with Hitanshu Dhawan</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fopen.spotify.com%2Fembed-podcast%2Fepisode%2F7bCRoIObCrL7Qz6C0PjMfa&amp;display_name=Spotify&amp;url=https%3A%2F%2Fopen.spotify.com%2Fepisode%2F7bCRoIObCrL7Qz6C0PjMfa&amp;image=https%3A%2F%2Fi.scdn.co%2Fimage%2F2df9dcafc407904e869f1ccba86b5c8bd70445bc&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=spotify" width="600" height="232" frameborder="0" scrolling="no"><a href="https://medium.com/media/20e197e9488b17407caa72ba0814120a/href">https://medium.com/media/20e197e9488b17407caa72ba0814120a/href</a></iframe><p>Code Quality has always been a central theme in the life of a software developer.<br>Lints are one of the easiest ways to maintain some sanity over the codebase. Out of the box linters that Android Studio provides gives us the power to analyse the source code to flag programming errors, bugs, stylistic errors.</p><p>And in this episode, we have <a href="https://medium.com/u/d8b137a0ff77">Hitanshu Dhawan</a> from <a href="https://medium.com/u/b4d3b0217d2f">Urbanclap</a> who helps us, deep-dive, into the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*5SSSJ-19afcaQ9O87KI_JA.png" /><figcaption>img src : preforce.com</figcaption></figure><h3>Lints :</h3><p>Lint, or a linter, is a tool that analyses source code to flag programming errors, bugs, stylistic errors, and suspicious constructs.</p><p>Eg :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9IJFp3WpP4idUbtTBTGNbA.png" /><figcaption>Lint Error in Build.gradle</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zfVTVy8Wyjd81KJriRP0vQ.png" /><figcaption>Lint Error in Xml</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xdy5UAe2Cy48sxaS_cJBWA.png" /><figcaption>Lint Error in Kotlin/Java Code</figcaption></figure><h3>Custom Lints :</h3><p>In any organisation, there are internal code standards and Base classes like CustomViews which ought to be used instead of View classes provided by Android. Creating Custom Lints can ensure that all the other devs also follow the same standard and are warned if they miss something.</p><p>Use case: In our app as per the design guidelines all the radio button will have a default margin of 8 dp at the start which needs to be consistent throughout the app, and when a new guy tries to use the android version we want to show an error warning him/her about the custom option which is available</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*NdZtCcrH-puffOCS3vR-xw.png" /><figcaption>A new dev access the Android’s Radio Button, we want to show error message</figcaption></figure><p>Custom Radio Button Class:</p><pre>class IdiotRadioButton : AppCompatRadioButton {<br>    private var buttonPadding = 0<br><br>    constructor(context: Context?) : super(context) {<br>        init()<br>    }<br><br>    constructor(context: Context?, attrs: AttributeSet?) : super(<br>        context,<br>        attrs<br>    ) {<br>        init()<br>    }<br><br>    constructor(<br>        context: Context?,<br>        attrs: AttributeSet?,<br>        defStyleAttr: Int<br>    ) : super(context, attrs, defStyleAttr) {<br>        init()<br>    }<br><br>    private fun init() {<br>        buttonPadding = <em>resources<br>            </em>.getDimensionPixelOffset(R.dimen.<em>list_item_button_right_margin</em>)<br> // default margin <br>    }<br><br>    override fun getCompoundPaddingLeft(): Int {<br>        return buttonPadding + super.getCompoundPaddingLeft()<br>    }<br>}</pre><h4>Step 1: Create a Java/Kotlin Library</h4><p>In an existing android studio project create a new java/kotlin module lets name it “AndroidiotLint”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2IEdhnqSvwkTxfsmasYVNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mepBAMuw7z2dFS1bCPA6WQ.png" /></figure><p><strong>Step 2: Add dependencies</strong></p><p>Module build.gradle</p><pre>//AndroidiotLint/build.gradle</pre><pre>apply plugin: &#39;java-library&#39;<br><br>ext <strong>{<br>    </strong>lintVersion = &quot;26.5.3&quot;<br><strong>}<br></strong>dependencies <strong>{<br>    </strong>implementation fileTree(dir: &#39;libs&#39;, include: [&#39;*.jar&#39;])<br><br>    // Lint<br>    compileOnly &quot;com.android.tools.lint:lint-api:$lintVersion&quot;<br>    compileOnly &quot;com.android.tools.lint:lint-checks:$lintVersion&quot;<br>    // Lint Testing<br>    testImplementation &quot;com.android.tools.lint:lint:$lintVersion&quot;<br>    testImplementation &quot;com.android.tools.lint:lint-tests:$lintVersion&quot;<br>    testImplementation &quot;junit:junit:4.12&quot;<br><br><strong>}</strong></pre><p>app/ build.gradle</p><pre>apply plugin: &#39;com.android.application&#39;<br><strong><br></strong>dependencies <strong>{<br>   //</strong>existing dependencies<br>     lintChecks project(path: &#39;:AndroidiotLint&#39;)<br><strong>}</strong></pre><blockquote><strong>Important</strong>: The lint version should correspond to the Android Gradle Plugin version + 23.If the AGP is 3.5.3, then the lint version should be 26.5.3</blockquote><h4>Step 3: Create Issue Registry</h4><p>IssueRegistry class contains the central list of issues that the Linter references while checking the codebase</p><pre>class IssueRegistry : IssueRegistry() {<br><br>    override val issues: List&lt;Issue&gt;<br>        get() = <em>listOf</em>(<br>            IdiotCodeIssueDetector.<em>ISSUE</em>,  <br>            IdiotXmlIssueDetector.<em>ISSUE<br>        </em>)<br>}</pre><p><strong>Step 4: Declare Issue Registry</strong></p><p>Above step would be enough if we wanted the linter to only work with gradle. But the real power of custom Lints is how they work out of the box with Android Studio. This can be done by declaring Issue registry file path in</p><pre>ModuleNam/src/main/resources/META-INF/services/com.android.tools.lint.client.api.IssueRegistry</pre><p>I.e Inside the Lint module only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t5kRGd2xc1VpbZ7tUxheDQ.png" /><figcaption>Create the directory structure and add the Issue registry path inside it</figcaption></figure><p><strong>Step 5: Create a Custom Detector Class</strong></p><p>A detector is able to find a particular problem. Each problem type is uniquely identified as an Issue.</p><pre>class IdiotCodeIssueDetector : Detector() {<br>}</pre><p><strong>Step 6: Create an Issue</strong></p><p>An issue is a potential bug in an Android application. An issue is discovered by a Detector, and has an associated Severity.</p><pre>class IdiotCodeIssueDetector : Detector() {<br><br><br>  companion object {<br><br>      val ISSUE = Issue.create(<br>          id = &quot;IdiotRadioButtonUsageWarning&quot;,<br>          briefDescription = &quot;Android&#39;s RadioButton should not be used&quot;,<br>          explanation = &quot;Don&#39;t use Android Radio button, be an idiot and use IdiotRadioButton instead&quot;,<br>          category = Category.CORRECTNESS,<br>          priority = 3,<br>          severity = Severity.WARNING,<br>          implementation = Implementation(<br>              IdiotCodeIssueDetector::class.<em>java</em>,<br>              Scope.RESOURCE_FILE_SCOPE<br>          )<br>      )<br>  }<br><br>}</pre><p><strong>Issue Attributes :</strong></p><p><strong>id</strong><em> </em>= It’s a unique identifier for the issue and the one we mention in @SupressWarning(“”).</p><p><strong>briefDescription</strong> = lines to explain the issue and will be shown for the lint, typically describing the problem rather than the fix.</p><p><strong>category</strong> = A category is a container for related issues. It can be any one of the following type.</p><pre><em>/** Issues related to running lint itself  */<br></em>@JvmField<br>val LINT = create(&quot;Lint&quot;, 110)<br><br><em>/** Issues related to correctness  */<br></em>@JvmField<br>val CORRECTNESS = create(&quot;Correctness&quot;, 100)<br><br><em>/** Issues related to security  */<br></em>@JvmField<br>val SECURITY = create(&quot;Security&quot;, 90)<br><br><em>/** Issues related to legal/compliance  */<br></em>@JvmField<br>val COMPLIANCE = create(&quot;Compliance&quot;, 85)<br><br><em>/** Issues related to performance  */<br></em>@JvmField<br>val PERFORMANCE = create(&quot;Performance&quot;, 80)<br><br><em>/** Issues related to usability  */<br></em>@JvmField<br>val USABILITY = create(&quot;Usability&quot;, 70)</pre><p><strong>priority</strong><em>: </em>It is defined on a scale of 1–10 which we can use to determine which issues to fix first.</p><p><strong>severity</strong>: Determines if a lint would be treated as a warning or an error while building the app. An error will cause the build to break while a warning would be just printed to console or a file.</p><pre><em>/**<br> * Fatal: Use sparingly because a warning marked as fatal will be<br> * considered critical and will abort Export APK etc in ADT<br> */<br></em>FATAL(&quot;Fatal&quot;),<br><br><em>/**<br> * Errors: The issue is known to be a real error that must be addressed.<br> */<br></em>ERROR(&quot;Error&quot;),<br><br><em>/**<br> * Warning: Probably a problem.<br> */<br></em>WARNING(&quot;Warning&quot;),<br><br><em>/**<br> * Information only: Might not be a problem, but the check has found<br> * something interesting to say about the code.<br> */<br></em>INFORMATIONAL(&quot;Information&quot;),<br><br><em>/**<br> * Ignore: The user doesn&#39;t want to see this issue<br> */<br></em>IGNORE(&quot;Ignore&quot;);</pre><p><strong>implementation</strong><em>: S</em>cope of the issue that it is interested in like manifest, resource files, java/Kotlin source files</p><blockquote>Note : <em>Issues and detectors are separate classes because a detector can discover<br> multiple different issues as it’s analysing code, and we want to be able to<br>different severities for different issues, the ability to suppress one but<br> not other issues from the same detector, and so on.</em></blockquote><p><strong>Step 7: Add the Scanner to the Detector</strong></p><blockquote><strong><em>FileScanner</em></strong> : Allows to perform analysis on a file, based on subtype of scanner implemented in the detector.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0IKH5gZpw_hUvpR5DPLLxQ.png" /><figcaption>Types of file scanners</figcaption></figure><p>As we want to scan the XML files to find the usage of RadioButton we will use XmlScanner, define the text reference we are looking for in an XML and the error message, and re-sync the Gradle afterward.</p><pre>class IdiotCodeIssueDetector : Detector(), XmlScanner {<br><br><br>    override fun getApplicableElements(): Collection&lt;String&gt; {<br>        return <em>listOf</em>(&quot;RadioButton&quot;) // will look for Radio Button //Text in all xml<br>    }<br><br>override fun visitElement(context: XmlContext, element: Element) {<br>    context.report(<br>        issue = ISSUE,<br>        location = context.getNameLocation(element),<br>        message = &quot;Usage of RadioButton is prohibited&quot; // Error message<br>    )<br>}</pre><p>Now if we open up the XML file we can see the error message</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*etgI7WM4eLJFHOF0Flv_xQ.png" /></figure><p><strong>Step 8: Add Lint (Quick) Fix</strong></p><p>As only showing error is not enough, we would ideally like to replace the Radio button with our IdiotRadioButton.</p><p>In comes LintFixes using which we provide structured data to be used by the IDE to create an actual fix.</p><pre>class IdiotCodeIssueDetector : Detector(), XmlScanner {<br><br><br>    override fun getApplicableElements(): Collection&lt;String&gt; {<br>        return <em>listOf</em>(&quot;RadioButton&quot;)<br>    }<br><br>    override fun visitElement(context: XmlContext, element: Element) {<br><br>        val idiotRadioButtonFix = LintFix.create()<br>            .name(&quot;Use IdiotRadioButton&quot;)<br>            .replace()<br>            .text(&quot;RadioButton&quot;)<br>            .with(&quot;com.androidiots.playground.IdiotRadioButton&quot;)<br>            .robot(true)<br>            .independent(true)<br>            .build()<br><br>        context.report(<br>            issue = ISSUE,<br>            location = context.getNameLocation(element),<br>            message = &quot;Usage of Radio Button is prohibited&quot;,<br>            quickfixData = idiotRadioButtonFix<br>        )<br>    }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7yf7fkPW8_MxlI4js5zzHg.png" /><figcaption>Now the error will give suggestion to use the IdiotRadioButton</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*q00NUvVCMrxzBJTD336aYQ.png" /><figcaption>RadioButton will be replaced by IdiotRadioButton</figcaption></figure><h3>Testing Lints :</h3><p>Unfortunately, we cannot debug our lints just like we debug apps. That’s because lints don’t run on mobile device. What we can do is writing test cases for the lint and run those tests in debug mode</p><pre>class IdiotCodeIssueDetectorTest {<br>    <br><br>    @Test<br>    fun testRadioButton() {<br><br>            lint()?.files(<br>                xml(<br>                    &quot;res/layout/layout.xml&quot;,<br>                    &quot;&quot;&quot;<br>                &lt;merge&gt;<br>                &lt;RadioButton<br>            android:layout_width=&quot;wrap_content&quot;<br>            android:layout_height=&quot;wrap_content&quot;<br>            app:layout_constraintBottom_toBottomOf=&quot;parent&quot;<br>            app:layout_constraintEnd_toEndOf=&quot;parent&quot;<br>            app:layout_constraintStart_toStartOf=&quot;parent&quot;<br>            app:layout_constraintTop_toTopOf=&quot;parent&quot;<br>            /&gt;<br>&lt;/merge&gt;<br>            &quot;&quot;&quot;<br>                ).indented()<br>            )<br>                ?.issues(IdiotCodeIssueDetector.ISSUE)<br>                ?.run()<br>                ?.expectWarningCount(1)<br>                ?.verifyFixes()<br>                ?.checkFix(<br>                    null,<br>                    xml(<br>                        &quot;res/layout/layout.xml&quot;,<br>                        &quot;&quot;&quot;<br>                &lt;merge&gt;<br>                     &lt;com.androidiots.playground.IdiotRadioButton<br>            android:layout_width=&quot;wrap_content&quot;<br>            android:layout_height=&quot;wrap_content&quot;<br>            app:layout_constraintBottom_toBottomOf=&quot;parent&quot;<br>            app:layout_constraintEnd_toEndOf=&quot;parent&quot;<br>            app:layout_constraintStart_toStartOf=&quot;parent&quot;<br>            app:layout_constraintTop_toTopOf=&quot;parent&quot; /&gt;<br>                &lt;/merge&gt;<br>            &quot;&quot;&quot;<br>               ).indented()<br>                )<br>    }<br>}</pre><p>This test checks<em> </em>that the actual number of errors in this lint check matches exactly the given count.</p><h3>Lint Internals :</h3><p>Java and kotlin files are converted to UAST and we write our lint rules for this UAST.</p><p>UAST stands for Universal abstract syntax tree, where it’s a tree representation of the source code. Read more about UAST <a href="https://en.wikipedia.org/wiki/Abstract_syntax_tree"><strong>here</strong></a>.</p><p>And along with gradlew and XML file, this UAST is consumed by the Lint Analysis process to point out lint errors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0JJb2lyx3BDEvONd-dWQ-g.png" /></figure><h3>References:</h3><ul><li><a href="https://github.com/Androidiots/playground/tree/customLints">Androidiots/playground</a></li><li><a href="https://developer.android.com/studio/write/lint">Improve your code with lint checks | Android Studio | Android Developers</a></li></ul><ul><li><a href="https://proandroiddev.com/implementing-your-first-android-lint-rule-6e572383b292">Link</a>: Implementing your first Android lint rule</li><li><a href="https://medium.com/@roderiklagerweij/writing-a-custom-android-ui-inheritance-lint-rule-9af254480399">Link</a>: Writing a Custom Android UI Inheritance Lint Rule</li><li><a href="https://jayrambhia.com/blog/android-lint">Link</a>: Get started with Android Lint — Custom Lint Rules</li><li><a href="https://jayrambhia.com/blog/android-lint-ref">Link</a>: Android Lint Deep dive — Advanced custom Lint rules</li><li><a href="https://www.bignerdranch.com/blog/building-custom-lint-checks-in-android/">Link</a>: Building Custom Lint Checks in Android</li></ul><p>We are inviting Android Developers to contribute back to the community via AndroIDIOTS. If you are interested in recording a podcast or writing tech articles, we would love to have you on board. <a href="https://androidiots.typeform.com/to/RbWDKC"><strong><em>Here</em></strong></a> is a small form you can fill so we can get back to you.</p><p><strong>Follow us on </strong><a href="https://twitter.com/androidiots"><strong>Twitter</strong></a><strong> for regular updates and feel free to DM the hosts (</strong><a href="https://twitter.com/AnupamSingh0211"><strong>Anupam</strong></a><strong> &amp; </strong><a href="https://twitter.com/apps_dot_build"><strong>Vivek</strong></a><strong>) for any queries.</strong></p><p><strong>If you have any questions/suggestions/queries about the topic feel free to contact the speaker </strong><a href="https://medium.com/u/d8b137a0ff77"><strong>Hitanshu Dhawan</strong></a><strong> </strong>for more info.</p><p><strong>Cheers!!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=349f0651d458" width="1" height="1" alt=""><hr><p><a href="https://medium.com/androidiots/androidiots-podcast-e18-custom-lints-349f0651d458">AndroIdiots Podcast E18: Custom Lints</a> was originally published in <a href="https://medium.com/androidiots">AndroIDIOTS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Androidiots Podcast 17:  Android Studio Plugins with Tushar Aeron]]></title>
            <link>https://medium.com/androidiots/androidiots-podcast-17-android-studio-plugins-with-tushar-aeron-d8f95db21388?source=rss----eea095bae2c2---4</link>
            <guid isPermaLink="false">https://medium.com/p/d8f95db21388</guid>
            <category><![CDATA[podcast]]></category>
            <category><![CDATA[plugins]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Anupam Singh]]></dc:creator>
            <pubDate>Mon, 06 Jul 2020 08:42:41 GMT</pubDate>
            <atom:updated>2020-07-06T09:26:05.220Z</atom:updated>
            <content:encoded><![CDATA[<h3>Andro Idiots Podcast 17: Android Studio Plugins with Tushar Aeron</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fopen.spotify.com%2Fembed-podcast%2Fepisode%2F3LYcdLn7Bw3lgqmgp9O9w6&amp;display_name=Spotify&amp;url=https%3A%2F%2Fopen.spotify.com%2Fepisode%2F3LYcdLn7Bw3lgqmgp9O9w6&amp;image=https%3A%2F%2Fi.scdn.co%2Fimage%2Fcbf540ee5cdc028c7bf67366641f6d454d769a38&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=spotify" width="600" height="232" frameborder="0" scrolling="no"><a href="https://medium.com/media/afa24b833d058fddd0c248fdf79946ec/href">https://medium.com/media/afa24b833d058fddd0c248fdf79946ec/href</a></iframe><p>Android Studio was announced on May 16, 2013, at the Google I/O conference as an IDE for android development and we finally said Bye Bye to our beloved Eclipse Android Development Tools (ADT).</p><p>It quickly became the de facto tool for all future android development. It’s built on Jetbrains’ IntelliJ platform which comes with a host of features like File templates, Code navigation, and the one that we are going to discuss in this episode with <a href="https://medium.com/u/86238bd189e0">Tusharaeron</a> from <a href="https://medium.com/u/b4d3b0217d2f">Urbanclap</a>, <strong>Plugins</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QIA3Cvm8ntHKzN88" /><figcaption>Photo by <a href="https://unsplash.com/@anton_nazaretian?utm_source=medium&amp;utm_medium=referral">Anton Nazaretian</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Show Notes<br>Plugin :</h3><p>A software component that adds a specific feature to an existing computer program.</p><p>In Android Studio some of the commonly used plugins are <a href="https://plugins.jetbrains.com/plugin/7856-adb-wifi">ADB wifi</a>, <a href="https://plugins.jetbrains.com/plugin/8634-robopojogenerator">RoboPojoGenerator</a> and <a href="https://plugins.jetbrains.com/plugin/9792-key-promoter-x">KeyPromotorX</a></p><h4>Why write your own?</h4><p>We observe that in day to day development, there are a few tasks that are executed repeatedly and slowly eat up dev-productivity. To avoid these we can create custom plugins specific to our project or our organization. For example, we use Jenkins as our CI tool. To trigger a build on Jenkins you have to open a browser, log in, find your job, and then run it. What we did was create an Android Studio custom plugin which lets us do the same in 2 clicks without having to leave the IDE.</p><p><strong>How to write your own?<br></strong>Let&#39;s walk you through a step by step guide which takes you from knowing nothing about Android Studio plugins to publishing one of your own.</p><h3>Prerequisites :</h3><ol><li>Android Studio latest edition</li><li>Intellij Community Edition</li></ol><p>We need a platform to work on Android Studio was built on IntelliJ hence we create plugins for IntelliJ only</p><blockquote><em>Note</em>: IntelliJ CE should be compatible with the Android Studio build number.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mIZVzlRasJWbuV3PTLcsjg.png" /><figcaption>Check the build number for community edition at <a href="https://www.jetbrains.com/idea/download/other.html">https://www.jetbrains.com/idea/download/other.html</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5k8vvj8Ms0XsKs3PuxCKBw.png" /><figcaption>Check your studio build number in ” About Android Studio”</figcaption></figure><h3>Step 1: Create A Gradle project in Intellij</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p2dotBcipe2PgDKw5ReDHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1iVKZLBWl4BmBPU43P8uQA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rlHcTbWNn3JPisTSFOClhw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3rqLxd4XO7bNz8chH46cQA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*bf-kvkGfnQxWT_Q8HNSsGg.png" /></figure><h4>Understanding Project Architecture :</h4><ol><li><strong>Plugin.xml<br></strong>This file is similar to <strong>AndroidManifest.xml</strong> used in Android development. It contains metadata about the plugin and here we can register different elements of our plugin like actions, components etc.</li></ol><pre><strong>&lt;idea-plugin&gt;</strong><br>    <strong>&lt;id&gt;</strong>myPlugin.myPlugin<strong>&lt;/id&gt;</strong><br>    <strong>&lt;name&gt;</strong>Hello Idiots action Project<strong>&lt;/name&gt;</strong><br>    <strong>&lt;version&gt;</strong>0.0.2<strong>&lt;/version&gt;</strong><br>    <strong>&lt;vendor</strong> email=&quot;andro021idiots@gmail.com&quot; url=&quot;androidiots.in&quot;<strong>&gt;</strong>Androidiots<strong>&lt;/vendor&gt;</strong></pre><pre>    <strong>&lt;extensions</strong> defaultExtensionNs=&quot;com.intellij&quot;<strong>&gt;</strong><br>        &lt;!-- Add your extensions here --&gt;<br>    <strong>&lt;/extensions&gt;</strong></pre><pre>    <strong>&lt;actions&gt;</strong><br>        &lt;!-- Add your actions here --&gt;<br>    <strong>&lt;/actions&gt;</strong></pre><pre><strong>&lt;applicationcomponents&gt;</strong><br>        &lt;!-- Add your components here --&gt;<br>    <strong>&lt;/applicationcomponents&gt;</strong><br><strong>&lt;/idea-plugin&gt;</strong></pre><p>2.<strong> build.gradle</strong><br>We can mention our repositories, dependencies inside this file. It is essential to mention the local android studio path as <strong>alternativeIdePath </strong>to run our plugin in Android Studio.</p><pre>buildscript {<br>    ext.kotlin_version = &#39;1.2.31&#39;</pre><pre>    repositories {<br>        mavenCentral()<br>    }<br>    dependencies {<br>        classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot;<br>    }<br>}</pre><pre>plugins {<br>    id &#39;java&#39;<br>    id &#39;org.jetbrains.intellij&#39; version &#39;0.4.10&#39;<br>}</pre><pre>version &#39;1.0-SNAPSHOT&#39;</pre><pre>apply plugin: &#39;kotlin&#39;</pre><pre>sourceCompatibility = 1.8</pre><pre>repositories {<br>    mavenCentral()<br>}</pre><pre><strong>dependencies</strong> <strong>{</strong><br>    compile &quot;org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version&quot;<br>    testCompile group: &#39;junit&#39;, name: &#39;junit&#39;, version: &#39;4.12&#39;<br><strong>}</strong></pre><pre>compileKotlin {<br>    kotlinOptions.jvmTarget = &quot;1.8&quot;<br>}<br>compileTestKotlin {<br>    kotlinOptions.jvmTarget = &quot;1.8&quot;<br>}<br>intellij {<br>    version &#39;2019.1.4&#39;<br>    <strong>alternativeIdePath</strong> &#39;/Applications/Android Studio.app&#39; <em>// add your local android studio path here <br></em>}<br>patchPluginXml {<br>    sinceBuild = &#39;191.8026&#39;<br>    untilBuild = &#39;191.*&#39;<br>}</pre><h3>Step 2: Define Actions and Components</h3><p><strong>Actions</strong>: Remember the toolbar at the top of your project, where you see the options like File, Edit, Tool, Build and Run, etc. When you click on one of these options every line item inside the drop-down is called an <strong>Action</strong>. <br>Actions are organized into groups, these groups can contain other groups and so on and so forth. We can create our own action by extending <strong>AnAction()</strong> class.</p><pre>class IdiotAction: AnAction() {</pre><pre>    override fun actionPerformed(e: AnActionEvent) {<br>        val noti = NotificationGroup(&quot;myFirstPlugin&quot;, NotificationDisplayType.BALLOON, true)<br>        noti.createNotification(&quot;My Title&quot;,<br>                &quot;My Message&quot;,<br>                NotificationType.INFORMATION,<br>                null<br>        ).notify(e.project)<br>    }</pre><p><strong>Components: </strong>Components control the life-cycle and manage the state of a plugin.</p><p>There are 3 variants of Component :</p><p>1. <strong>Application-level component</strong>: it is initialized when the IDE (Android Studio) starts up. Remember the Send Statistics to google dialog on the bottom right corner that pops up every single time, that’s an application-level component.</p><pre>class <strong>ApplicationComponentExample</strong> : ApplicationComponent {     <br>    val LOG: Logger = Logger.getInstance(ApplicationComponentExample::class.java)<br>    override fun <strong>initComponent</strong>() {        <br>        LOG.info(&quot;Initializing plugin. Project is not opened yet&quot;);        <br>    }     <br>    override fun <strong>disposeComponent</strong>() {<br>        LOG.info(&quot;Disposing plugin. Intellij is closing&quot;);    <br>    }     <br>    override fun <strong>getComponentName</strong>(): String {        <br>        return &quot;components.ApplicationComponentExample&quot;    <br>    }<br>}</pre><p>2. <strong>Project-Level Components:</strong> it is created for each project instance in the IDE.</p><pre>class <strong>ProjectComponentExample</strong> : <strong>ProjectComponent</strong> {     <br>    val LOG: Logger = Logger.getInstance(ProjectComponentExample::class.java)<br>    private var project: Project? = null<br>    private var applicationComponent: ApplicationComponentExample? = null</pre><pre>    <strong>constructor</strong> (project: Project, applicationComponentExample: ApplicationComponentExample){<br>        this.project = project<br>        this.applicationComponent = applicationComponentExample<br>    }<br>    override fun <strong>initComponent</strong>() {<br>        //called before projectOpened()<br>    }<br>    override fun <strong>disposeComponent</strong>() {<br>        //called after projectClosed()<br>    }<br>    override fun <strong>projectOpened</strong>() {<br>        LOG.info(String.<em>format</em>(&quot;Project &#39;%s&#39; has been opened, base dir &#39;%s&#39;&quot;, project?.getName(),     project?.getBaseDir()?.getCanonicalPath()))<br>    }<br>    override fun <strong>projectClosed</strong>() {<br>        LOG.info(String.<em>format</em>(&quot;Project &#39;%s&#39; has been closed.&quot;,   project?.getName()))<br>    }    <br>    override fun <strong>getComponentName</strong>(): String {        <br>        return &quot;components.ApplicationComponentExample&quot;    <br>    }<br>}</pre><p>3. <strong>Module-level components:</strong> it is created for each module inside every project loaded in the IDE.</p><pre>class <strong>ModuleLevelComponent</strong> : ModuleComponent {     <br>    val LOG: Logger = Logger.getInstance(<strong>ModuleLevelComponent</strong>::class.java)<br>    private var module: Module? = null</pre><pre>    <strong>constructor</strong> (module: Module){<br>        this.module = module<br>    }<br>    override fun <strong>projectOpened</strong>() {<br>        LOG.info(String.<em>format</em>(&quot;Module &#39;%s&#39; has been opened&#39;&quot;, module?.getName()))<br>    }<br>    override fun <strong>projectClosed</strong>() {<br>        LOG.info(String.<em>format</em>(&quot;Module &#39;%s&#39; has been closed&#39;&quot;, module?.getName()))<br>    }    <br>    override fun <strong>moduleAdded</strong>(){        <br>        LOG.info(String.<em>format</em>(&quot;Module &#39;%s&#39; has been added&#39;&quot;, module?.getName()))    <br>    }<br>}</pre><blockquote>JetBrains has introduced 3 new components namely <a href="https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_services.html">Service</a>, <a href="https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_extension_points.html">Extensions</a>, and <a href="https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_listeners.html">Listeners</a> which make writing plugins even simpler and even save development time using <a href="https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/dynamic_plugins.html">Dynamic plugins</a>.</blockquote><p><strong>Services:</strong> It is a plugin component loaded on demand when your plugin calls the getService() method of the <a href="https://upsource.jetbrains.com/idea-ce/file/idea-ce-7cf49a16e4e15a18fa2f742635053647ae94abfb/platform/core-api/src/com/intellij/openapi/components/ServiceManager.java">ServiceManager</a> class and the IntelliJ Platform ensures that only one instance of a service is loaded even though the service is called several times.<br>Service is also available at the application level, project level, and module level.</p><p>For example, say we are migrating our code from java to kotlin and need to find all the java files when the project loads. We can then use the project level service. When a project loads, we can call the getService() method of ServiceManager, get the instance of the service and calculate the file count.</p><p><strong>Extensions:</strong> Extensions are the most common way for a plugin to extend the functionality of the IntelliJ Platform. It is not as straightforward as adding an action to a menu or toolbar.<br>Extensions(read Extension Points) allow us to add tool windows, the panels displayed at the sides of the IDE user interface, or to add pages to the Settings/Preferences dialog.</p><p><strong>Listeners: </strong>Listeners allow plugins to declaratively subscribe to events delivered through the message bus. You can define both application- and project-level listeners.</p><p>Let’s take an example of a project level listener. The class implementing the listener interface can define a one-argument constructor accepting a Project, and it will receive the instance of the project for which the listener is created.</p><blockquote>Refer below git projects, for the understanding of Actions, Components, Service, Extensions, and Listeners.<br>1. <a href="https://github.com/tusharaeron/intellij-plugin-demo">IntelliJ-Plugin Examples</a><br>2. <a href="https://github.com/tusharaeron/jenkins-android-studio-plugin">Android Studio Jenkins Project</a></blockquote><p><a href="https://github.com/tusharaeron/jenkins-android-studio-plugin">tusharaeron/jenkins-android-studio-plugin</a></p><h4>Step 3: Open the plugin.xml</h4><pre>&lt;idea-plugin&gt;<br>    &lt;id&gt;myPlugin.myPlugin&lt;/id&gt;<br>    &lt;name&gt;Hello Idiots action Project&lt;/name&gt;<br>    &lt;version&gt;0.0.2&lt;/version&gt;<br>    &lt;vendor email=&quot;andro021idiots@gmail.com&quot; url=&quot;androidiots.in&quot;&gt;Androidiots&lt;/vendor&gt;</pre><pre>    &lt;depends&gt;com.intellij.modules.lang&lt;/depends&gt;<br>    <strong>&lt;application-components&gt; <em>// Add application component here</em></strong><br>        &lt;component&gt;<br>            &lt;implementation-  class&gt;components.ApplicationComponentExample&lt;/implementation-class&gt;<br>        &lt;/component&gt;<br>    &lt;/application-components&gt;<br>    <strong>&lt;actions&gt;</strong> <strong><em>// Add your actions and group of actions here</em></strong><br>        <strong>&lt;group</strong>          <strong><em>// For grouping similar actions</em></strong><br>               id=&quot;IdiotPluginGroup&quot;  <br>               text=&quot;Androidiots&quot;<br>               description=&quot;Idiot Menu&quot;&gt;<br>             <strong>&lt;add-to-group</strong>  <strong><em>// Add reference for where to place the group</em></strong><em><br> </em>              group-id=&quot;MainMenu&quot; anchor=&quot;last&quot;/&gt;<br>             <strong>&lt;action</strong> id=&quot;IdiotAction&quot; <strong>// Add indivisual action</strong><br>                    class=&quot;action.IdiotAction&quot;<br>                    text=&quot;Idiot Action&quot;<br>                    description=&quot;Hello Idiots&quot;&gt;<br>                <strong>&lt;keyboard-shortcut</strong> first-keystroke=&quot;control alt k&quot; keymap=&quot;$default&quot;/&gt; <strong><em>// Set shortcut for action</em></strong><br>            &lt;/action&gt;<br>            &lt;/group&gt;<br>    &lt;/actions&gt;<br>&lt;/idea-plugin&gt;</pre><p>Declare your elements (i.e. actions, components, services, etc.) in plugin.xml to be picked when the studio is launched. Refer comments in the code above for understanding the usage of individual elements.</p><h4>Step 4: Run the project</h4><p>Either by <strong>Run</strong> button in IntelliJ or in the Gradle Tool Window, you can find the <strong>runIde</strong> task. Double click and run this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T71YQH78z0B8DI8sRT6v_g.png" /></figure><h4>Step 5: Wait for Android Studio to open</h4><p>When we hit run in our IntelliJ, it will build the plugin, launch Android Studio, (since we have mentioned <strong>alternativeIdePath </strong>in plugin.xml),<strong> </strong>and<strong> </strong>install the plugin. We can now see our Action placed at the last position on our Main Menu along with the keyboard shortcut which we have set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*bjYzDk6x3QEwDkB0YnO2Tw.png" /></figure><h4>Debugging</h4><p>Debugging plugins works exactly the same way as in android app development. Either you launch Android Studio while debugging or you attach the debugger once it’s already launched.</p><h4>Testing</h4><p>IntelliJ provides capabilities to do functional or integration testing of high-level functionality. <br>For example: We can use AssertJ and JUnit4 to create unit tests for our plugins. Please read <a href="http://www.jetbrains.org/intellij/sdk/docs/basics/testing_plugins.html">the official docs on testing</a>.</p><p>We need to add the respective dependency in build.gradle file.</p><pre><strong>dependencies</strong> {<br>  <strong>testImplementation</strong>(&quot;org.assertj:assertj-core:3.11.1&quot;)<br>}</pre><h4>Publish</h4><p>To locally share it with friends or colleagues, you can build a “zip file” of your Gradle plugin. They can install it via Android Studio’s plugin manager and start using it after restarting the IDE.<br>To publish your plugin visit the <a href="https://plugins.jetbrains.com/">JetBrains website</a>, signup, and upload your plugin. Jetbrains takes some time to review the plugin after which it will be available on the Plugins Marketplace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lEb4qhfNdASwz_RnvReT-Q.png" /></figure><h4>References</h4><ul><li><a href="https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started.html">Creating Your First Plugin</a></li><li><a href="https://github.com/tusharaeron/jenkins-android-studio-plugin">tusharaeron/jenkins-android-studio-plugin</a></li><li><a href="https://proandroiddev.com/how-i-automated-creating-files-for-a-new-screen-with-my-own-android-studio-plugin-5d54b14ba6fa">How I automated creating files for a new screen with my own Android Studio Plugin</a></li></ul><blockquote>You can check the codes of plugins you use in your day to day life <a href="https://github.com/balsikandar/Android-Studio-Plugins">i</a>n the <a href="https://github.com/balsikandar/Android-Studio-Plugins">Readme section</a>.</blockquote><p>We are inviting Android Developers to contribute back to the community via AndroIDIOTS. If you are interested in recording a podcast or writing tech articles, we would love to have you on board. <a href="https://androidiots.typeform.com/to/RbWDKC"><strong><em>Here</em></strong></a> is a small form you can fill so we can get back to you.</p><p><strong>Follow us on </strong><a href="https://twitter.com/androidiots"><strong>Twitter</strong></a><strong> for regular updates and feel free to DM the hosts (</strong><a href="https://twitter.com/AnupamSingh0211"><strong>Anupam</strong></a><strong> &amp; </strong><a href="https://twitter.com/apps_dot_build"><strong>Vivek</strong></a><strong>) for any queries.</strong></p><p><strong>If you have any questions/suggestions/queries about the topic feel free to contact the speaker </strong><a href="https://medium.com/u/86238bd189e0">Tusharaeron</a> for more info.</p><p><strong>Cheers!!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8f95db21388" width="1" height="1" alt=""><hr><p><a href="https://medium.com/androidiots/androidiots-podcast-17-android-studio-plugins-with-tushar-aeron-d8f95db21388">Androidiots Podcast 17:  Android Studio Plugins with Tushar Aeron</a> was originally published in <a href="https://medium.com/androidiots">AndroIDIOTS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AndroIdiots Podcast 16: Android Process LifeCycle]]></title>
            <link>https://medium.com/androidiots/androidiots-podcast-16-android-process-lifecycle-5cdba10fa431?source=rss----eea095bae2c2---4</link>
            <guid isPermaLink="false">https://medium.com/p/5cdba10fa431</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[podcast]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Anupam Singh]]></dc:creator>
            <pubDate>Mon, 09 Sep 2019 05:45:07 GMT</pubDate>
            <atom:updated>2020-06-05T04:53:47.779Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttps%253A%252F%252Fapi.soundcloud.com%252Ftracks%252F677975262%26show_artwork%3Dtrue&amp;url=https%3A%2F%2Fsoundcloud.com%2Fandro-idiots%2Fandroid-process-episode&amp;image=https%3A%2F%2Fi1.sndcdn.com%2Fartworks-000594634944-4wyx8r-t500x500.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=soundcloud" width="800" height="166" frameborder="0" scrolling="no"><a href="https://medium.com/media/a14b759ea2123d44f765f114ee5ccf78/href">https://medium.com/media/a14b759ea2123d44f765f114ee5ccf78/href</a></iframe><p>Android Platform has come a long way since its launch, from Cupcake to Pie. We had lots of deserts, product features like Notification Centre, Material Design, Dark-theme, capabilities like Google Assistant, Video Casting, Wireless charging etc.</p><p>But like any good software system the core always remains intact, so today we try to answer how the System designers went about designing android system, what are the design considerations that they kept in mind?</p><p>How system treats &amp; interacts with the apps that we developers make? We deep dive into entire android process lifecycle with <a href="https://medium.com/u/9b0b075c25a">Deepak Garg</a> and try to understand the same.</p><h3>Show Notes :</h3><p><strong>Design Considerations while designing Android :</strong></p><ol><li>In Background app in Mobile Vs Closed App on Desktop systems.</li><li>No <a href="https://opensource.com/article/18/9/swap-space-linux-systems">Swap Space</a> in Android</li><li>Frequent Application Switching</li><li>“All Applications are created equal” philosophy.</li></ol><p>The Android operating system is a multi-user Linux system in which each application is a different user. Android assigns a unique user ID (UID) to each Android application and runs it in its own process.</p><p>A process is created for an application specifically when some part of its code is run and the process keeps running until it’s no longer needed and system claims its memory to be used by for other applications.</p><p>Each Process has its own VM hence every app runs in isolation with other apps, this design also helps in securing apps to be infected by malicious apps.</p><p>ART starts the first VM which in turns calls the main method of original zygote process which then preloads all shared classes and resources to the memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w09pDvGChkXBmVc0xznUbQ.png" /></figure><p><strong>Zygote: </strong>Every process in android is forked from Original Zygote Process. Original Zygote provides a template for all new mini zygote process and a VM is also assigned to every mini zygote process and the application is bound to the thread of this process.</p><p><strong>Software Component Containers: </strong>Once loaded, they hold the activity, services, content providers component of the application, and the map of these preloaded classes is shared when an application is launched, dramatically reducing load time of application.</p><p><strong>Activity Thread : </strong>The entry point for an activity, it manages the execution of main thread in an application process, handles broadcasts. and whatever is triggered from main method is called MAIN UI thread</p><p>When any application is launched the Zygote is bootstrapped, classes are loaded into the JVM, and the JVM to locates<strong> </strong>the java public static void &quot;<em>main&quot; </em>method and invoke it in Activity Thread.</p><p>And once main method is invoked it does 3 main things</p><p><strong>1. Prepares the main Looper</strong> : Looper.prepareMainLooper method is called and this marks the current random thread as the applications main thread</p><p><strong>2. Sets up a Handler</strong> : There is a private inner class called H that extends the Handler class.Which is initialised to sever as the main handler, H Handler contains all the definitions that an application can be in like LAUNCH_ACTIVITY, PAUSE_ACTIVITY, BIND_SERVICE etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8OODlYgAL5fVM0pSOupVwg.png" /><figcaption>This handler handles over 50 case statements. Resuming an activity, pausing it, starting it, binding services, handling receivers, flagging low memory, or trimMemory warnings all are handled here.</figcaption></figure><p><strong>3. Calls the Looper.loop() method on the main thread:</strong> In order for work to take place on the main thread, the main method calls the Looper’s loop method on the main thread. This begins the execution of messages on the Loopers message queue. Now the main thread is up and running and can begin processing tasks from the queue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lKYbQUkfC9n9TCBp4exLQA.png" /></figure><p>The handler in ActivityThread class is responsible for handling every message that’s received in its onHandleMessage method. Resuming an activity, pausing it, starting it, binding services, handling receivers, flagging low memory, or trimMemory warnings all are handled here.</p><p>Even RELAUNCH_ACTIVITY is one of these cases. handleRelaunchActivity() is invoked which internally calls handleRelaunchActivityInner() which calls performLaunchActivity() which returns an Activity object. This Activity object already has crucial information like: Instrumentation, Context, Component and Intent information to the Activity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eMzuEbVm9Iq1uEm9nNQcIQ.png" /></figure><p>The final step is when Instrumentation class method `callActivityOnCreate()` is invoked, which calls `performCreate()` method of the Activity class that calls Activity’s OnCreate method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mlIusIn5Nsbmex7OYRpyTg.png" /></figure><p>At this point, your Activity has been loaded with tonnes of useful variables and methods that can be used to create your awesome Android App! This is all thanks to the ActivityThread, some smart thinking behind the Handler and Looper framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QI8nX5bychGrZNflyJQLNg.png" /><figcaption>Activity Creation LifeCycle</figcaption></figure><p>We are inviting Android Developers to contribute back to the community via AndroIDIOTS. If you are interested in recording a podcast or writing tech articles, we would love to have you on board. <a href="https://androidiots.typeform.com/to/RbWDKC"><strong><em>Here</em></strong></a> is a small form you can fill so we can get back to you.</p><p><strong>Follow us on </strong><a href="https://twitter.com/androidiots"><strong>twitter</strong></a><strong> for regular updates and feel free to DM the hosts (</strong><a href="https://twitter.com/AnupamSingh0211"><strong>Anupam</strong></a><strong> &amp; </strong><a href="https://twitter.com/apps_dot_build"><strong>Tushar</strong></a><strong>) for any queries.</strong></p><p><strong>Cheers!!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5cdba10fa431" width="1" height="1" alt=""><hr><p><a href="https://medium.com/androidiots/androidiots-podcast-16-android-process-lifecycle-5cdba10fa431">AndroIdiots Podcast 16: Android Process LifeCycle</a> was originally published in <a href="https://medium.com/androidiots">AndroIDIOTS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AndroIdiots Podcast 15: Using Kotlin as a BackEnd language with Matt]]></title>
            <link>https://medium.com/androidiots/androidiots-podcast-15-using-kotlin-as-a-backend-language-with-matt-3f8f0aa78b00?source=rss----eea095bae2c2---4</link>
            <guid isPermaLink="false">https://medium.com/p/3f8f0aa78b00</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[podcast]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Tushar Gupta]]></dc:creator>
            <pubDate>Tue, 25 Jun 2019 06:37:44 GMT</pubDate>
            <atom:updated>2019-06-25T07:34:15.092Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttps%253A%252F%252Fapi.soundcloud.com%252Ftracks%252F641697633%26show_artwork%3Dtrue&amp;url=https%3A%2F%2Fsoundcloud.com%2Fandro-idiots%2Fusing-kotlin-as-a-backend-language-with-matt&amp;image=http%3A%2F%2Fi1.sndcdn.com%2Fartworks-000557111001-rivnev-t500x500.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=soundcloud" width="800" height="166" frameborder="0" scrolling="no"><a href="https://medium.com/media/59427b9edba1c75a39db4ffde6f4fd1a/href">https://medium.com/media/59427b9edba1c75a39db4ffde6f4fd1a/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AiAFXmVR9cKu6eaOgxBlDw.png" /></figure><p>We are all software developers and we love to code, don’t we? And ofcourse, <strong>Kotlin</strong> is our favourite language.</p><p>Don’t you wish you could write every system in Kotlin. Well its no news, that the Kotlin makers are actually making it true. We have discussed it before in our <a href="https://medium.com/androidiots/androidiots-podcast-13-kotlin-multiplatform-native-b03aba3ad64">previous episode about Kotlin/Multiplatform</a> and in this episode we discuss how to get started with Kotlin as a BackEnd language with <a href="https://uk.linkedin.com/in/mattthornfield"><strong>Matt Thornfield</strong></a>.</p><p><strong>Matt</strong> is the author of the book<strong> </strong><a href="https://www.manning.com/livevideo/building-spring-boot-applications-with-the-kotlin-programming-language"><strong>Building Spring Boot Applications with the Kotlin Programming Language</strong></a> distributed by <a href="https://www.manning.com/"><strong>Manning Publications</strong></a> and also has a <a href="https://www.lynda.com/Kotlin-tutorials/Build-Spring-Boot-Apps-Kotlin-Programming-Language/802861-2.html"><strong>course on with same name</strong></a> on <strong>LinkedIn Learning</strong>.</p><h3>Show Summary:</h3><h4>Spring Boot:</h4><p><a href="https://spring.io/projects/spring-boot">Spring Boot</a> makes it easy to create stand-alone, production-grade Spring based Applications that you can “just run”. It’s an open source project which creates a huge range of frameworks, plugins &amp; tools around Java Virtual Machine and is used by many enterprises already.</p><h4>How to get started:</h4><p>You can put in your requirements on <a href="https://start.spring.io/"><strong>https://start.spring.io/</strong></a><strong> </strong>and chose Kotlin as the language of your choice. Other options are Java &amp; Groovy. The website will generate a zip file, a starter kit, which can be used to start coding right away in your favourite IDE.</p><h4>Advantages of Using Kotlin:</h4><p>Immutable variables, data classes, sealed classes, compile time null check, a much less verbosity, a somewhat functional programming support, and Kotlin is still evolving. We will surely get a lot more features.</p><h4>Complexities of switching to Kotlin from Java:</h4><p>A couple of complexities around making the data side work and design choices. Listen to the podcast for more details. You may also check <a href="https://www.lynda.com/Kotlin-tutorials/Build-Spring-Boot-Apps-Kotlin-Programming-Language/802861-2.html">Matt’s course</a> to learn all the nitty-gritties.</p><p>We thoroughly enjoyed having Matt on our podcast. Thank you Matt.</p><p>Manning Publications have been kind enough to share some discount codes for our listeners. <br>You can use the code: <strong>podandroid19</strong> to get a flat 40% discount on any live free video course.</p><p>And here are few codes to get free Spring Boot Application With Kotlin course: <br><strong>andkot-38DA</strong><br><strong>andkot-480B</strong><br><strong>andkot-B1FC</strong></p><p>Link to the course :<br><a href="https://gate.sc/?url=https%3A%2F%2Fwww.manning.com%2Flivevideo%2Fbuilding-spring-boot-applications-with-the-kotlin-programming-language&amp;token=e7cbb4-1-1561445219882">www.manning.com/livevideo/buildin…gramming-language</a></p><p>We are inviting Android Developers to contribute back to the community via AndroIDIOTS. If you are interested in recording a podcast or writing tech articles, we would love to have you on board. <a href="https://androidiots.typeform.com/to/RbWDKC"><strong><em>Here</em></strong></a> is a small form you can fill so we can get back to you.</p><p><strong>Follow us on </strong><a href="https://twitter.com/androidiots"><strong>twitter</strong></a><strong> for regular updates and feel free to DM the hosts (</strong><a href="https://twitter.com/AnupamSingh0211"><strong>Anupam</strong></a><strong> &amp; </strong><a href="https://twitter.com/apps_dot_build"><strong>Tushar</strong></a><strong>) for any queries.</strong></p><p><strong>Cheers!!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f8f0aa78b00" width="1" height="1" alt=""><hr><p><a href="https://medium.com/androidiots/androidiots-podcast-15-using-kotlin-as-a-backend-language-with-matt-3f8f0aa78b00">AndroIdiots Podcast 15: Using Kotlin as a BackEnd language with Matt</a> was originally published in <a href="https://medium.com/androidiots">AndroIDIOTS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beat the Tweet #24 : 3–9th June 2019]]></title>
            <link>https://medium.com/androidiots/beat-the-tweet-24-3-9th-june-2019-f08546493642?source=rss----eea095bae2c2---4</link>
            <guid isPermaLink="false">https://medium.com/p/f08546493642</guid>
            <category><![CDATA[beat-the-tweet]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[androiddev]]></category>
            <dc:creator><![CDATA[AndroIdiot]]></dc:creator>
            <pubDate>Sun, 09 Jun 2019 17:33:44 GMT</pubDate>
            <atom:updated>2019-06-09T17:33:44.107Z</atom:updated>
            <content:encoded><![CDATA[<h3>Beat the Tweet #24 : 3–9th June 2019</h3><blockquote>Here are the top tweets from the last week you should not miss if you’re an <strong>#AndroidDev</strong>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LHFmyFXAB6L54to6dpvGQg.png" /></figure><h3>Amit Shekhar on Twitter</h3><p>LiveData vs Observable Field in Android https://t.co/gRXKSRojhE #AndroidDev #Android</p><h3>Google Developers on Twitter</h3><p>Fact: Great things happen when people come together. Attend, organize, and speak at #KotlinEverywhere events. Find out more at https://t.co/DnpHBJ1Fnq and from this video with @FMuntenescu and @HHariri. Watch now → https://t.co/zSLG4KYg2C</p><h3>androidiots on Twitter</h3><p>@androidiots is in top 5 Android podcast to listen to in 2019. @_feedspot has been really kind to feature us. Thank you everyone for your support. https://t.co/zxbkLZmk7g #AndroidDev #AndroidDevelopment #kotlin #podcast #India Everything Compounds :)</p><h3>androidiots on Twitter</h3><p>In this episode, @urbanclap Android Team meets the passionate #Android folks @Zomato. We discuss Recyclerview, its Adapter, scalability and optimising performance with @SajalGupta94, @_prtks &amp;amp; @_yashikakatyal. Do listen in. There is tons of information. https://t.co/WQiYJJJkHY</p><h3>MindOrks on Twitter</h3><p>What is Lint? What is it used for? https://t.co/p0brKWyO5F #AndroidDev #Android</p><h3>MindOrks on Twitter</h3><p>Exploring Android ViewPager2 in Android https://t.co/yRfXTE1RiX #AndroidDev #Android</p><h3>Amit Shekhar on Twitter</h3><p>Mockito cannot mock because : final class in Kotlin https://t.co/R7GgyVYOtU #AndroidDev #Android #Kotlin</p><h3>Firebase on Twitter</h3><p>Firebase is coming back to India in June, with day-long events in Bangalore and Pune, and many meetups along the way. 🔥❤️🇮🇳 Register today → https://t.co/rOqAX0QLhV</p><h3>Android Developers on Twitter</h3><p>Build a dark theme for your Android app with the @MaterialDesign documentation and code! ☑️ Save battery power for devices with OLED screens ☑️ Reduce eye strain ☑️ Facilitate use in low-light environments Get started here → https://t.co/Jqvf4V4eGU https://t.co/I5ehVUrbtY</p><h3>Android Developers on Twitter</h3><p>Direct sharing from your app is now lightning fast with #AndroidQ&#39;s ShareSheet ⚡️ ✅ Loads instantly when launched ✅ Backwards compatible ✅ Publish sharing shortcuts in advance Learn more in this short video → https://t.co/EPVWEEt9tA</p><h3>MindOrks on Twitter</h3><p>Using Custom and Downloadable Fonts in Android https://t.co/LWAZsVgh3C #AndroidDev #Android #MindOrks</p><h3>Amit Shekhar on Twitter</h3><p>Create your own Custom View https://t.co/5JPSQYWIr0 #AndroidDev #Android #MindOrks #KotlinEverywhere #Kotlin</p><h3>Amit Shekhar on Twitter</h3><p>Gradle Tips and Tricks for Android https://t.co/zlfOKGAQd0 #AndroidDev #Android #MindOrks #Gradle #Tips #tricks</p><h3>Amit Shekhar on Twitter</h3><p>Primary and Secondary Constructors in Kotlin https://t.co/4e6OI9AQ5P #AndroidDev #Android #MindOrks #Kotlin</p><h3>Flutter on Twitter</h3><p>At #io19, @DomesticMouse and @redbrogdon&#39;s dedicated their talk to building for iOS with Flutter 📲 Check it out to learn how to build interfaces iOS users will love with Flutter&#39;s Cupertino package! Watch here → https://t.co/4RsYtTVvvX</p><h3>Amit Shekhar on Twitter</h3><p>Understanding inline, noinline, and crossinline in Kotlin https://t.co/6fi2nrfU0o #AndroidDev #Kotlin</p><h3>Kotlin on Twitter</h3><p>KotlinEverywhere is being planned all over the world. We already have more than 50 events - find or host one near you at https://t.co/s11wpDeaNP! https://t.co/CIbzWn1vHQ</p><h3>Android Developers on Twitter</h3><p>We teamed up with @Udacity to bring you a free online course 🙌 Learn to build Android apps using #Kotlin and #AndroidJetpack! Get started here ↓ https://t.co/uTLZs4WItd</p><h3>Firebase on Twitter</h3><p>On a new episode of #AskFirebase, @ThatJenPerson teams up with A/B testing champion @jonnypotatoes to answer your questions about Firebase Auth! 🔥🏆 Watch here → https://t.co/pFyOTp8MO6</p><h3>Amit Shekhar on Twitter</h3><p>Using Exoplayer to play Video and Audio in Android like a Pro https://t.co/kVzPz9TJjo #AndroidDev #Android #Exoplayer #pro #MindOrks</p><h3>Android Developers on Twitter</h3><p>AndroidQ Beta 3 is here! Join @adressyengineer to learn more about new updates including: ✅ Dark theme ✅ Gestural navigation ✅ Smart actions Watch here → https://t.co/7YQKZKlgAL</p><p>Follow <a href="https://medium.com/androidiots"><strong>AndroIDIOTS</strong></a> for more such amazing android related content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f08546493642" width="1" height="1" alt=""><hr><p><a href="https://medium.com/androidiots/beat-the-tweet-24-3-9th-june-2019-f08546493642">Beat the Tweet #24 : 3–9th June 2019</a> was originally published in <a href="https://medium.com/androidiots">AndroIDIOTS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Androidiots Podcast 14 : Better RecylerViews feat Zomato.]]></title>
            <link>https://medium.com/androidiots/androidiots-podcast-14-better-recylerviews-feat-zomato-dd8bb2cac732?source=rss----eea095bae2c2---4</link>
            <guid isPermaLink="false">https://medium.com/p/dd8bb2cac732</guid>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[zomato]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[podcast]]></category>
            <dc:creator><![CDATA[Anupam Singh]]></dc:creator>
            <pubDate>Mon, 27 May 2019 06:14:15 GMT</pubDate>
            <atom:updated>2019-05-27T06:19:39.678Z</atom:updated>
            <content:encoded><![CDATA[<h3>Androidiots Podcast 14 : Better RecylerViews with Zomato.</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2F%3Furl%3Dhttps%253A%252F%252Fapi.soundcloud.com%252Ftracks%252F625891083%26show_artwork%3Dtrue&amp;url=https%3A%2F%2Fsoundcloud.com%2Fandro-idiots%2Fandroidiots-podcast-13-better-recyclerview-with-zomato&amp;image=http%3A%2F%2Fi1.sndcdn.com%2Fartworks-000540782592-vb350l-t500x500.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=soundcloud" width="800" height="166" frameborder="0" scrolling="no"><a href="https://medium.com/media/56aca1a88e6a0bbd71f7871189b776d7/href">https://medium.com/media/56aca1a88e6a0bbd71f7871189b776d7/href</a></iframe><p><a href="https://medium.com/u/ef2c5a9dfd53">Zomato</a> is an Indian search and discovery platform for restaurants, founded in 2008 by <strong>Deepinder Goyal</strong> and <strong>Pankaj Chaddah</strong>. It currently operates in 24 countries with more than 50 million downloads of its Android app.<br>Such scale requires an app to be dynamic enough to support various types of restaurants, cuisines of multiple locations. Hence the App needs to be developed at scale and be able to serve in all the possible forms.<br>We all know in Android this can be achieved with templatized nested Recyclerview and in this episode we have <strong>Sajal Gupta</strong>, <strong>Prateek</strong> and <strong>Yashika</strong> from <a href="https://medium.com/u/ef2c5a9dfd53">Zomato</a>&#39;s Android team, walk us through their journey with Recyclerview &amp; its adapter and things that they do to make it highly performant and scalable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ya9BwcyV-z3esrPl0nErNg.png" /></figure><h3>Show Notes :</h3><p>Generations of Recyclerview adapter at <a href="https://medium.com/u/ef2c5a9dfd53">Zomato</a> Android App.</p><h3>Better RecyclerView Adapter (V1):</h3><p>Heavy lifting is done by the base adapter itself, the developer extending this version needs to take care of onCreateViewHolder() and rest everything is sorted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sontrBkUCVr6L3fFoD20JA.png" /></figure><h3>Better RecyclerView Adapter(V2):</h3><p>View model is abstracted which was previously coupled with the view but now view holder holds the view model. Hence the <em>onbind</em>() method is no more needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p0FzpaHqw_5Opaffm6eBTw.png" /></figure><h3>Better RecyclerView Adapter (V3):</h3><p>With onset of <a href="https://developer.android.com/reference/android/support/v7/util/DiffUtil">DiffUtils</a> the adapter evolved to support the same.</p><p>Question : How to send the user interaction information in this new Adapter?<br>Hint : Take a closer look to <em>onViewAttachedToWindow</em>() method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tWcj8v5Cq0Rwnbjm_PgvwQ.png" /></figure><p>For more adapter secrets do listen to the episode.</p><p>We are inviting Android Developers to contribute back to the community via AndroIDIOTS. If you are interested in recording a podcast or writing tech articles, we would love to have you on board. <a href="https://androidiots.typeform.com/to/RbWDKC"><strong><em>Here</em></strong></a> is a small form you can fill so we can get back to you.</p><p><strong>Follow us on </strong><a href="https://twitter.com/androidiots"><strong>twitter</strong></a><strong> for regular updates and feel free to DM the hosts (</strong><a href="https://twitter.com/AnupamSingh0211"><strong>Anupam</strong></a><strong> &amp; </strong><a href="https://twitter.com/apps_dot_build"><strong>Tushar</strong></a><strong>) for any queries.</strong></p><p><strong>Cheers!!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd8bb2cac732" width="1" height="1" alt=""><hr><p><a href="https://medium.com/androidiots/androidiots-podcast-14-better-recylerviews-feat-zomato-dd8bb2cac732">Androidiots Podcast 14 : Better RecylerViews feat Zomato.</a> was originally published in <a href="https://medium.com/androidiots">AndroIDIOTS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>