<?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[Stories by Ajay Maurya on Medium]]></title>
        <description><![CDATA[Stories by Ajay Maurya on Medium]]></description>
        <link>https://medium.com/@ajaymaurya_72779?source=rss-92035b465e19------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fIAWlGX7kw4sv2rcVpI-OQ.jpeg</url>
            <title>Stories by Ajay Maurya on Medium</title>
            <link>https://medium.com/@ajaymaurya_72779?source=rss-92035b465e19------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 12:09:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ajaymaurya_72779/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Critical Skill]]></title>
            <link>https://medium.com/@ajaymaurya_72779/critical-skill-1a62b87368d0?source=rss-92035b465e19------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a62b87368d0</guid>
            <dc:creator><![CDATA[Ajay Maurya]]></dc:creator>
            <pubDate>Sun, 17 May 2026 10:19:56 GMT</pubDate>
            <atom:updated>2026-05-24T18:19:15.123Z</atom:updated>
            <content:encoded><![CDATA[<p>Critical Skill Questions</p><h3>1. Tell me about yourself.</h3><h3>Answer (STAR Style)</h3><p>INT: I’m currently working as a Principal Software Engineer at Circles.Life, I have over 15years of experience in application development and over 10 year working experience in Singapore, designing the base architecture and creating HLD/LLD. where I lead large-scale <strong>mobile and platform engineering initiatives across various domains such as Telecom</strong>, Financial service, Media Entertainment, eCommerce, edTech for LMS system..</p><p><strong>Career : I have strong hands-on</strong> in Application development and leadership experience managing and mentoring teams while delivering carrier-grade mobile platforms serving million users globally. My, key involvement in applications launch, release management, meeting with product, director, and stakeholder</p><p><strong>Achievement: One of the key achievements</strong> in my current role has been improving platform stability to achieve 99.97% crash-free sessions &amp; users and reducing <strong>production incidents significantly </strong>through an observability-first architecture using OpenTelemetry and proactive monitoring strategies.</p><p><strong>Attributes &amp; Skill: From a technical standpoint</strong>, my expertise includes React-Native for cross platform mobile applications (Android and iOS) and Native Android development using Kotlin and Java, I have built various Library or SDK fot main application to use, also ability to work in backend Node.js and Python in GRAPHQL / Rest API, and implemented UI workflow chatbot using <strong>AI/LLM integrations including MCP client and MCP Server</strong></p><p><strong>I’ve also had the opportunity to work with global teams and stakeholders across</strong> Singapore, Indonesia, and Mexico, which has helped me develop <strong>strong cross-functional collaboration </strong>and <strong>stakeholder management skills in multicultural environments.</strong></p><p><strong>Next</strong>: In addition, I’m PMP certified and hold a Master’s degree in Data science during professional carer, <strong>which gives me a balanced perspective across technical execution</strong>, <strong>delivery management</strong>, and <strong>strategic problem solving</strong>.</p><p>What excites me about this opportunity at Barclays is the scale of <strong>digital transformation</strong>, the focus on <strong>engineering excellence</strong>, and the opportunity to <strong>contribute</strong> both <strong>technically</strong> and<strong> strategically</strong> in a highly regulated and impactful environment.</p><h3>2. Why do you want to join Barclays?</h3><h3>Answer</h3><p>About: “I see Barclays as a global financial service, investment banking, wealth management and customer centric user experience that combines strong banking heritage with large-scale digital transformation. What attracts me most is the opportunity to work in an environment where digital transformations, Secure and Scalable banking with customer centric user experience.</p><p>I’m particularly excited about the scale of engineering challenges, the focus on modernisation, cloud transformation, automation on risk and controls within technology delivery.</p><p>Alignment: This role also aligns with my experience leading engineering teams, managing delivery, improving operational efficiency, and driving digital transformation initiatives in enterprise environments. I believe I can contribute both technically and strategically while continuing to grow as a technology leader.”</p><h3>3. Describe a critical production incident you handled.</h3><h3>Answer</h3><h4>Situation</h4><p>“In one project, we experienced a critical production outage after a deployment where API response times increased drastically, impacting customers and downstream systems.”</p><h4>Task</h4><p>“As the engineering lead, my responsibility was to stabilize the system quickly, minimize customer impact, and coordinate communication with stakeholders.”</p><h4>Action</h4><p>“I immediately initiated an incident bridge involving DevOps, backend teams, and infrastructure teams. We performed log analysis and identified a memory leak introduced in a recent release.</p><p>To minimize impact:</p><ul><li>We rolled back the affected deployment.</li><li>Enabled additional monitoring dashboards.</li><li>Prioritized customer-impacting transactions.</li><li>Sent regular updates to business stakeholders and leadership.</li></ul><p>Post-incident, I led a detailed RCA session and implemented:</p><ul><li>Automated performance testing in CI/CD.</li><li>Better observability and alerting.</li><li>Canary deployment strategy.”</li></ul><h4>Result</h4><p>“The platform stabilized within a short duration, customer impact was minimized, and similar incidents reduced significantly afterward. We also improved deployment confidence and incident response maturity.”</p><h3>4. How do you manage risk and controls in engineering?</h3><h3>Answer</h3><p>“In engineering leadership, I believe risk and controls should be embedded into delivery processes rather than treated separately.</p><p>My approach includes:</p><ul><li>Strong access control and IAM practices.</li><li>Peer code reviews and approval workflows.</li><li>Automated security scans in CI/CD pipelines.</li><li>Vulnerability management and patch governance.</li><li>Audit logging and monitoring.</li><li>Disaster recovery and backup validation.</li><li>Environment segregation and release governance.</li></ul><p>In regulated environments, I also ensure proper documentation, traceability, and compliance alignment. My goal is always to balance innovation with operational resilience and governance.”</p><h3>5. Tell me about a digital transformation initiative you led.</h3><h3>Answer</h3><h4>Situation</h4><p>“At Circles.Life, we were working on launching a carrier application for the Mexico market with a major focus on enabling seamless eSIM onboarding and digital activation for users. The challenge was that the implementation required deep integration with <strong>Android eUICC manager APIs, carrier-grade security standards, and authentication mechanisms aligned with telecom compliance requirements</strong>.”</p><h4>Task</h4><p>“As part of the leadership team, I was responsible for driving the<strong> technical research</strong>, <strong>architecture direction</strong>, and<strong> delivery execution for the eSIM onboarding capability while ensuring scalability, security, and successful market launch timelines</strong>.”</p><h4>Action</h4><p>“I led the engineering effort across <strong>mobile</strong> and <strong>backend</strong> teams to design and implement a <strong>digital-first eSIM activation workflow</strong>.</p><p>Key contributions included:</p><ul><li>Researching and implementing Android eUICC manager capabilities for one-click eSIM installation and activation.</li><li>Leading technical feasibility studies around carrier privileges and secure provisioning workflows.</li><li>Working extensively on Amdocs JWT-based authentication integration to ensure secure communication between the mobile application and telecom backend systems.</li><li>Collaborating closely with product, security, and telecom certification teams to meet compliance and carrier certification requirements.</li><li>Driving observability and monitoring strategies to proactively identify onboarding and activation failures.</li><li>Coordinating cross-functional teams across multiple regions to align delivery timelines and technical dependencies.”</li></ul><h4>Result</h4><p>“As a result, we successfully delivered the core eSIM onboarding capability for the Mexico launch application within timeline expectations. The initiative significantly improved the digital onboarding experience by reducing manual activation dependencies and enabling a smoother customer journey.</p><p>The solution also established a scalable architecture foundation for future carrier integrations and strengthened platform reliability and operational visibility during rollout.”</p><h3>6. How do you balance delivery speed with quality and governance?</h3><h3>Answer</h3><p>“I believe speed and governance should complement each other rather than conflict.</p><p>My approach is:</p><ul><li>Domain QA testing and certifications.</li><li>Automated quality gates.</li><li>Risk-based release planning.</li><li>Incremental deployments.</li><li>CI/CD automation.</li><li>Continuous monitoring.</li></ul><p>For high-risk releases, I ensure additional validation and rollback strategies are in place. This allows teams to deliver faster while maintaining operational stability and compliance.”</p><h3>7. Tell me about a difficult stakeholder situation.</h3><h3>Answer</h3><h4>Situation</h4><p>“In one project, business stakeholders wanted aggressive delivery timelines, while engineering teams raised concerns around technical debt and stability.”</p><h4>Task</h4><p>“My responsibility was to align both sides and ensure sustainable delivery.”</p><h4>Action</h4><p>“I organised workshops with stakeholders and engineering teams to prioritize features based on business impact and technical risk.</p><p>I presented:</p><ul><li>Delivery dependencies.</li><li>Risk assessment.</li><li>Effort estimation.</li><li>Long-term operational implications.</li></ul><p>I proposed phased delivery with critical business priorities addressed first while parallel technical improvements were planned.”</p><h4>Result</h4><p>“This improved stakeholder confidence, reduced delivery conflicts, and helped achieve both business objectives and system stability.”</p><h3>8. How do you mentor engineering teams?</h3><h3>Answer</h3><p>“I strongly believe leadership is about enabling others to grow.</p><p>My mentoring approach includes:</p><ul><li>Regular one-on-one discussions.</li><li>Career development planning.</li><li>Technical coaching.</li><li>Delegating ownership.</li><li>Encouraging innovation and accountability.</li><li>Providing actionable feedback.</li></ul><p>I also create an environment where engineers feel comfortable raising concerns and contributing ideas. This improves collaboration, retention, and overall team performance.”</p><h3>9. Explain your experience with cloud and microservices.</h3><h3>Answer</h3><p>“I have worked extensively with cloud-native and distributed system architectures.</p><p>My experience includes:</p><ul><li>AWS services.</li><li>Containerisation and orchestration</li><li>REST APIs and API gateways.</li><li>Monitoring and observability.</li><li>CI/CD pipelines.</li><li>Auto-scaling and resilience strategies.</li></ul><p>From a leadership perspective, I focus not only on architecture design but also on governance, operational support, and scalability.”</p><h3>10. Tell me about a time you handled project risk.</h3><h3>Answer</h3><h4>Situation</h4><p>“A critical project had dependency delays from an external vendor which threatened delivery timelines.”</p><h4>Task</h4><p>“As engineering lead, I needed to ensure project continuity while minimizing business impact.”</p><h4>Action</h4><p>“I identified alternate implementation approaches, re-prioritized internal deliverables, and created contingency plans.</p><p>I maintained regular governance updates with leadership and stakeholders and ensured engineering teams focused on parallel workstreams.”</p><h4>Result</h4><p>“The project delivery remained on track with minimal delay, and proactive risk management improved stakeholder confidence.”</p><h3>11. How do you ensure software quality?</h3><h3>Answer</h3><p>“My quality strategy focuses on prevention rather than correction.</p><p>I implement:</p><ul><li>Coding standards.</li><li>Peer reviews.</li><li>Automated testing.</li><li>Security scanning.</li><li>CI/CD quality gates.</li><li>Performance monitoring.</li><li>Release validation processes.</li></ul><p>I also promote accountability within teams so quality becomes a shared engineering responsibility.”</p><h3>12. Describe your leadership style.</h3><h3>Answer</h3><p>“My leadership style is collaborative, transparent, and outcome-driven.</p><p>I focus on:</p><ul><li>Empowering teams.</li><li>Building trust.</li><li>Encouraging ownership.</li><li>Aligning engineering with business goals.</li><li>Driving accountability while supporting growth.</li></ul><p>I adapt based on team maturity and project needs, but I consistently maintain open communication and operational discipline.”</p><h3>13. What is your approach to change and transformation?</h3><h3>Answer</h3><p>“I approach transformation with a balance of strategy, execution, and risk management.</p><p>Successful transformation requires:</p><ul><li>Clear vision.</li><li>Stakeholder alignment.</li><li>Incremental execution.</li><li>Continuous communication.</li><li>Governance controls.</li><li>Team adoption.</li></ul><p>I typically focus on measurable improvements such as automation, scalability, operational efficiency, and customer experience.”</p><h3>14. How do you prioritize competing priorities?</h3><h3>Answer</h3><p>“I prioritize using a combination of:</p><ul><li>Business impact.</li><li>Risk assessment.</li><li>Regulatory importance.</li><li>Customer impact.</li><li>Technical dependencies.</li><li>Long-term sustainability.</li></ul><p>I ensure transparent communication with stakeholders and use data-driven prioritization rather than emotional or reactive decision-making.”</p><h3>15. What are your strengths as an Engineering Lead?</h3><h3>Answer</h3><p>“My key strengths are:</p><ul><li>Technical leadership.</li><li>Stakeholder management.</li><li>Risk and governance awareness.</li><li>Delivery execution.</li><li>Team mentoring.</li><li>Problem-solving under pressure.</li><li>Digital transformation experience.</li></ul><p>I’m comfortable operating both strategically and technically, which helps me align engineering execution with business outcomes.”</p><h3>16. Describe a failure and lesson learned.</h3><h3>Answer</h3><h4>Situation</h4><p>“Early in a transformation initiative, we underestimated the impact of dependencies across systems.”</p><h4>Action</h4><p>“This caused delivery delays and operational challenges.”</p><h4>Learning</h4><p>“I learned the importance of dependency mapping, early stakeholder alignment, and phased execution planning.”</p><h4>Result</h4><p>“After implementing stronger governance and planning mechanisms, subsequent phases were delivered much more efficiently.”</p><h3>17. How do you handle underperforming team members?</h3><h3>Answer</h3><p>“I first try to understand the root cause:</p><ul><li>Skill gap</li><li>Clarity issue</li><li>Motivation problem</li><li>Workload imbalance</li></ul><p>Then I create a structured improvement plan with:</p><ul><li>Clear expectations</li><li>Coaching</li><li>Frequent feedback</li><li>Measurable goals</li></ul><p>My goal is always to support improvement while maintaining accountability.”</p><h3>18. What is the future of engineering in banking?</h3><h3>Answer</h3><p>“I believe banking technology will continue evolving toward:</p><ul><li>AI-assisted engineering</li><li>Cloud-native platforms</li><li>Hyperautomation</li><li>Strong cybersecurity</li><li>Real-time data platforms</li><li>DevSecOps</li><li>Platform engineering</li></ul><p>However, innovation in banking must always be balanced with governance, resilience, and regulatory compliance.”</p><h3>19. Why should we hire you?</h3><h3>Answer</h3><p>“I bring a combination of technical expertise, leadership capability, governance awareness, and delivery execution experience.</p><p>I have experience leading teams, handling critical systems, driving transformation initiatives, and aligning engineering outcomes with business goals.</p><p>I believe my background in mobile and distributed technologies, incident management, stakeholder collaboration, and operational excellence aligns very well with the Engineering Lead expectations at Barclays.”</p><h3>20. Do you have any questions for us?</h3><h3>Answer</h3><p>“Yes, I’d love to understand:</p><ul><li>What are the major transformation initiatives currently happening within the engineering organization?</li><li>What are the biggest challenges this role is expected to solve in the first 6–12 months?</li><li>How does Barclays measure engineering success beyond delivery metrics?</li><li>How are risk and controls integrated into the engineering lifecycle?”</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a62b87368d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java Spring Boot]]></title>
            <link>https://medium.com/@ajaymaurya_72779/java-spring-boot-1b68741cc787?source=rss-92035b465e19------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b68741cc787</guid>
            <dc:creator><![CDATA[Ajay Maurya]]></dc:creator>
            <pubDate>Sat, 16 May 2026 20:04:21 GMT</pubDate>
            <atom:updated>2026-05-16T20:04:21.952Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*ImKMoP0rLmGSS8TfThlUoQ.png" /></figure><p>Sparing Framework: For building WebApplication and Enterprise Applications.</p><p>Why Spring framework is popular because it provides →.</p><ol><li>Dependency injection</li><li>Database transaction management</li><li>integrations with other Java Framework</li><li>Web MVC framework for building Web applications</li></ol><p><strong>The is Spring Boot ?</strong></p><p>It is built on top of Spring Framework to eliminate violence eliminations readily available Spring-based applications without requiring development to write the same boilerplate configure again and again.</p><p>It provide:</p><ol><li>Spring Boot Starter</li><li>Spring Boot Autoconfigurationns</li><li>Externalized configuration</li><li>Spring boot actuator</li><li>Easy-to-use embedded servlet container support</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*MUMEVfJ3yedvtGACkRVS0w.png" /></figure><p>IN SPRING FRAMEWORK DRAWBACK:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*QFy_nnrns0w2ijrMAyIkSw.png" /></figure><p>Spring boot key feature:</p><ol><li>Spring Boot Starters: Automatically</li><li>Spring Boot autoconfigurations</li><li>Externalized configurations &lt;This enables to developer to work in different environments.. annotation @Value or @configuration to the property and configuration file.</li><li>Spring Boot Actuator: Monitoring the application and dependency and health check.. environment details and monitor details configure details and mapping details</li><li>Easy to use embedded servlet container support: We need to deploy on the Tomcat server.</li></ol><p>Create Project:</p><ol><li>Spring initialize</li><li>Spring Boot CLI</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b68741cc787" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solid Principle Apps Development:]]></title>
            <link>https://medium.com/@ajaymaurya_72779/solid-principle-apps-development-7e3881749576?source=rss-92035b465e19------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e3881749576</guid>
            <dc:creator><![CDATA[Ajay Maurya]]></dc:creator>
            <pubDate>Fri, 26 Jan 2024 04:46:14 GMT</pubDate>
            <atom:updated>2024-01-26T18:50:20.606Z</atom:updated>
            <content:encoded><![CDATA[<h3>Solid Principle For Apps Development:</h3><p>Specially in the Kotlin programming language</p><p>This approach is to scale the Application development and critical approach to writing the code with the help of this principle.</p><h3>1. Single Responsibility Principle (SRP):</h3><p>A class should be only one reason to change. That means, a class has only single responsibility to perform certain operations.</p><pre>// Before applying SRP<br>class Report {<br>    fun generateReport(data: Map&lt;String, Any&gt;) {<br>        // logic to generate the report<br>    }    <br>    fun saveToFile(report: String, fileName: String) {<br>        // logic to save the report to a file<br>    }<br>}</pre><pre>// After Applying the Single Responsible principle. </pre><pre>class ReportGenerator {<br>    fun generateReport(data: Map&lt;String, Any&gt;): String {<br>        // logic to generate the report<br>    }<br>}</pre><pre>class ReportSaver {<br>    fun saveToFile(report: String, fileName: String) {<br>        // logic to save the report to a file<br>    }<br>}</pre><h3>2. Open/Closed Principle (OCP):</h3><p>Open for Extension but closed for modifications. It means a class should extend to perform new functionality added with minimal or no changes to existing code. It can be achieved by using the interface.</p><pre>// Before applying OCP<br>class Rectangle(var width: Double, var height: Double)<br><br>class AreaCalculator {<br>    fun calculateArea(rectangle: Rectangle): Double {<br>        return rectangle.width * rectangle.height<br>    }<br>}</pre><pre>// After applying OCP<br>interface Shape {<br>    fun calculateArea(): Double<br>}</pre><pre>class Rectangle(val width: Double, val height: Double) : Shape {<br>    override fun calculateArea(): Double = width * height<br>}</pre><pre>class Circle(val radius: Double) : Shape {<br>    override fun calculateArea(): Double = Math.PI * radius * radius<br>}</pre><h3>3. Liskov Substitution Principle (LSP):</h3><pre>// Before applying LSP<br>open class Bird {<br>    open fun fly() {<br>        println(&quot;Bird is flying&quot;)<br>    }<br>}<br><br>class Penguin : Bird() {<br>    override fun fly() {<br>        // Penguins can&#39;t fly<br>        println(&quot;Penguin can&#39;t fly&quot;)<br>    }<br>}</pre><pre>// After applying LSP<br>interface Flyable {<br>    fun fly()<br>}</pre><pre>class Sparrow : Flyable {<br>    override fun fly() {<br>        println(&quot;Sparrow is flying&quot;)<br>    }<br>}</pre><pre>class Penguin : Flyable {<br>    override fun fly() {<br>        // Penguins can&#39;t fly<br>        println(&quot;Penguin can&#39;t fly&quot;)<br>    }<br>}</pre><h3>4. Interface Segregation Principle (ISP):</h3><pre>// Before applying ISP<br>interface Worker {<br>    fun work()<br>    fun eat()<br>}<br>class Human : Worker {<br>    override fun work() {<br>        println(&quot;Human is working&quot;)<br>    }<br>    override fun eat() {<br>        println(&quot;Human is eating&quot;)<br>    }<br>}</pre><pre>// After applying ISP<br>interface Workable {<br>    fun work()<br>}</pre><pre>interface Eatable {<br>    fun eat()<br>}</pre><pre>class Human : Workable, Eatable {<br>    override fun work() {<br>        println(&quot;Human is working&quot;)<br>    }</pre><pre>    override fun eat() {<br>        println(&quot;Human is eating&quot;)<br>    }<br>}</pre><h3>5. Dependency Inversion Principle (DIP):</h3><pre>// Before applying DIP<br>class LightSwitch {<br>    private val bulb = LightBulb()<br>    fun operate() {<br>            bulb.turnOn()<br>            // logic to operate the light switch<br>        }<br>    }<br>    class LightBulb {<br>        fun turnOn() {<br>            // logic to turn on the light bulb<br>        }<br> }</pre><pre>// After applying DIP<br>interface Switchable {<br>    fun turnOn()<br>}</pre><pre>class LightSwitch(private val device: Switchable) {<br>    fun operate() {<br>        device.turnOn()<br>        // logic to operate the light switch<br>    }<br>}</pre><pre>class LightBulb : Switchable {<br>    override fun turnOn() {<br>        // logic to turn on the light bulb<br>    }<br>}</pre><blockquote>Thank You</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e3881749576" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hadoop:]]></title>
            <link>https://medium.com/@ajaymaurya_72779/hadoop-96d10ff0e80b?source=rss-92035b465e19------2</link>
            <guid isPermaLink="false">https://medium.com/p/96d10ff0e80b</guid>
            <dc:creator><![CDATA[Ajay Maurya]]></dc:creator>
            <pubDate>Sat, 18 Nov 2023 17:15:45 GMT</pubDate>
            <atom:updated>2023-11-18T17:15:45.983Z</atom:updated>
            <content:encoded><![CDATA[<p>Hadoop is a framework that allows the distributed process of large datasets across clusters of commodity computers using simple programming models</p><p><strong>Four Key Characteristics of Hadoop:</strong></p><blockquote><strong>Reliable</strong>: Store copies of the data on different machines and is resistant to hardware failure.</blockquote><blockquote><strong>Economical</strong>: Store data in Ordinary computers for data processing</blockquote><blockquote><strong>Scalable</strong>: Vertical and horizontal scaling.</blockquote><blockquote><strong>Flexible</strong>: Store huge data and use it later</blockquote><p>Data Sent to the program in good amount of time is not feasible in Traditional Database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*zWtDTjcn5iW2wOVjxh2K6w.png" /></figure><p>Component of hadoop Ecosystem: 3 main compannent</p><ol><li>HDFS , MapReduce and YARN</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vs2bwTLM3qYlT-ZYu-N-lQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96d10ff0e80b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design Pattern — OOPS Programming Language]]></title>
            <link>https://medium.com/@ajaymaurya_72779/design-pattern-oops-programming-language-151b0943823d?source=rss-92035b465e19------2</link>
            <guid isPermaLink="false">https://medium.com/p/151b0943823d</guid>
            <dc:creator><![CDATA[Ajay Maurya]]></dc:creator>
            <pubDate>Sat, 18 Nov 2023 17:14:51 GMT</pubDate>
            <atom:updated>2023-11-18T17:14:51.115Z</atom:updated>
            <content:encoded><![CDATA[<h3>Design Pattern — OOPS Programming Language</h3><p><strong>What is a Design pattern?</strong></p><p>Design patterns are commonly customized to solve a problem by building, and construction to make the software re-usable.</p><ul><li>Intent: of the pattern to describe the problem and solutions.</li><li><strong>Motivations</strong> further explain the problem and the solutions to the pattern making it possible</li><li>The structure. of classes shows each part of the pattern and how they related</li><li>Code: programming languages make it easier to grasp the idea behind the patterns.</li></ul><p>Classifications of Design Patterns:</p><ol><li>Creational Patterns: Provide <strong>an object creation mechanism </strong>that <strong>increases flexibility and reuse of existing code.</strong></li><li><strong>Structural Patterns: </strong>These explain how to combine/assemble objects and classes into a larger structure while keeping these structures flexible and efficient</li><li><strong>Behavioral Patterns: </strong>Take Care of <strong>effective communication </strong>and the assignment of responsibilities between objects.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9I-FyJc4c_ZuFAGnRE6jVA.png" /></figure><p>Creational Design Patterns:</p><ul><li><strong>Factory Method: </strong>Provide an interface for creating an object in a superclass, but allow the subclass to alter the type of object that will be created.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*wOV5uOxterRlzJl4.png" /></figure><h3>Why it’s needed:</h3><ol><li>Encapsulation: It encapsulates the object creation logic, allowing the client code to use the factory method to create objects without knowing the specific class implementation.</li><li>Flexibility and Extensibility: It allows easy extension by introducing new subclasses (ConcreteCreators) without modifying the existing codebase. For instance, adding a new type of vehicle is as simple as creating a new ConcreteProduct and its associated ConcreteCreator.</li><li>Abstraction: It promotes programming to an interface rather than implementation, allowing the system to work with a common interface without worrying about the actual implementations.</li></ol><ul><li><strong>Abstract Factory: </strong>it produces families of related objects without specifying their convert classes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*ClVSXB6oOHjWshmM.png" /></figure><ul><li><strong>Builder:</strong></li><li><strong>Prototype:</strong></li><li><strong>Singleton:</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=151b0943823d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Architect Role]]></title>
            <link>https://medium.com/@ajaymaurya_72779/android-architect-role-c51ba64683b1?source=rss-92035b465e19------2</link>
            <guid isPermaLink="false">https://medium.com/p/c51ba64683b1</guid>
            <dc:creator><![CDATA[Ajay Maurya]]></dc:creator>
            <pubDate>Sat, 18 Nov 2023 17:06:12 GMT</pubDate>
            <atom:updated>2023-11-18T17:14:29.689Z</atom:updated>
            <content:encoded><![CDATA[<p>How to improve the Android Application&#39;s performance?</p><h3>1. Profiling and Analysis:</h3><ul><li>Performance Profiling Tools: Use tools like Android Profiler or third-party profilers to identify performance bottlenecks, memory leaks, CPU usage, and network activity within your app.</li></ul><h3>2. UI/UX Optimization:</h3><ul><li>Optimize UI Rendering: Reduce overdraw, use efficient layouts (ConstraintLayout), and minimize view nesting to improve UI rendering performance.</li><li>Lazy Loading and Pagination: Load data asynchronously and use pagination for lists to display only the required amount of data at a time.</li></ul><h3>3. Background Tasks and Threading:</h3><ul><li>Use Background Threads: Offload CPU-intensive tasks, network operations, and database transactions to background threads (AsyncTask, Executors, or Kotlin Coroutines) to prevent blocking the main UI thread.</li><li>Thread Pool Management: Implement thread pool management to limit the number of concurrent threads and prevent resource exhaustion.</li></ul><h3>4. Memory Optimization:</h3><ul><li>Memory Management: Avoid memory leaks by releasing references properly, using weak references, and efficiently managing object creation and destruction.</li><li>Image and Resource Optimization: Compress images, use appropriate image formats (WebP), and minimize resource usage by caching and recycling resources effectively.</li></ul><h3>5. Network Optimization:</h3><ul><li>Optimize Network Calls: Use techniques like batching, caching, reducing payload size, and implementing efficient data transfer protocols (like HTTP/2) to minimize network usage.</li><li>Background Data Sync: Implement efficient background sync mechanisms (WorkManager, JobScheduler) for periodic data synchronization without affecting user interactions.</li></ul><h3>6. Code and Performance Improvements:</h3><ul><li>Code Refactoring: Optimize algorithms, remove redundant code, and refactor for better readability and performance.</li><li>Use Performance-Oriented Libraries: Utilize performance-oriented libraries and tools designed for specific tasks (e.g., Picasso/Glide for image loading, OkHttp/Retrofit for networking).</li></ul><h3>7. Battery and Power Efficiency:</h3><ul><li>Reduce Battery Consumption: Optimize location services, minimize wake locks, and manage device sensors efficiently to reduce battery consumption.</li></ul><h3>8. Application Size and Startup Time:</h3><ul><li>Reduce App Size: Minimize APK size by removing unused resources, code obfuscation (ProGuard/R8), and modularization (App Bundles).</li><li>Optimize App Startup: Use techniques like lazy initialization, deferred loading, and pre-caching to improve app startup time.</li></ul><h3>9. Testing and Optimization Iteration:</h3><ul><li>Performance Testing: Continuously test the app’s performance on different devices, OS versions, and network conditions to identify and resolve performance issues.</li><li>Regular Updates and Optimization: Iterate on improvements based on user feedback, performance metrics, and evolving technology trends.</li></ul><p>How to import Android Security?</p><h3>1. Secure Coding Practices:</h3><ul><li>Follow Android Security Best Practices: Adhere to guidelines provided by Android Developers for secure coding, permissions, data storage, etc.</li><li>Input Validation and Sanitization: Validate and sanitize user inputs to prevent common security vulnerabilities like SQL injection, XSS, and CSRF attacks.</li></ul><h3>2. Authentication and Authorization:</h3><ul><li>Secure Authentication: Implement strong authentication mechanisms like biometrics, OAuth, or token-based authentication to protect user data.</li><li>Authorization Controls: Enforce proper access controls to ensure that users have appropriate permissions for accessing sensitive data or performing critical operations.</li></ul><h3>3. Data Encryption:</h3><ul><li>Encrypt Sensitive Data: Implement encryption techniques (using Android’s encryption APIs) for storing sensitive information locally, especially in shared preferences or databases.</li></ul><h3>4. Network Security:</h3><ul><li>Use HTTPS: Always use HTTPS for secure communication between the app and backend servers to prevent eavesdropping and man-in-the-middle attacks.</li><li>Network Security Configuration: Configure network security settings (like network security configuration XML files) to specify security features for network connections.</li></ul><h3>5. Code Obfuscation and Minification:</h3><ul><li>ProGuard/R8: Use code obfuscation tools like ProGuard/R8 to obfuscate and shrink the code, making it harder for attackers to reverse-engineer the app.</li></ul><h3>6. Secure Storage:</h3><ul><li>Secure File Storage: Use secure storage techniques provided by Android (like KeyStore) to protect sensitive information, cryptographic keys, and credentials.</li></ul><h3>7. Regular Updates and Patching:</h3><ul><li>Update Dependencies: Keep all libraries, SDKs, and dependencies updated to the latest versions to patch known vulnerabilities.</li></ul><h3>8. Runtime Permissions:</h3><ul><li>Request Runtime Permissions: Implement the use of runtime permissions to request access to sensitive device features only when needed.</li></ul><h3>9. Testing and Validation:</h3><ul><li>Security Testing: Perform security testing (penetration testing, vulnerability assessments) to identify and mitigate potential vulnerabilities before deploying the app.</li></ul><h3>10. Secure Communication:</h3><ul><li>SSL Pinning: Implement SSL pinning to enhance security by validating server certificates to prevent man-in-the-middle attacks.</li></ul><h3>11. User Education and Awareness:</h3><ul><li>Educate Users: Guide users on safe app usage, awareness of security risks, and instructions on how to secure their data.</li></ul><p>What are the tools to use to find the vulnerability?</p><ol><li><strong>SonarQube</strong>: An open-source platform for continuous inspection of code quality, offering security vulnerability detection and reporting.</li><li><strong>Checkmarx</strong>: Analyzes source code to identify security vulnerabilities, focusing on potential issues in code during development.</li><li><strong>Fortify Static Code Analyzer:</strong> Identifies security issues, design flaws, and coding errors in applications’ source code.</li><li><strong>Veracode</strong>: Provides static code analysis to identify vulnerabilities, offering solutions for application security.</li></ol><h3>Container Security Tools:</h3><ol><li>Docker Bench for Security: Scans Docker containers against best practices and security recommendations.</li><li>Clair: Analyzes vulnerabilities in containers, providing security information about the software inside containers.</li></ol><p>What are microservices and how it developed?</p><p>What is the RFP?</p><p>Request for Approval.</p><p>What are 3-point estimations?</p><h3>Components of Three-Point Estimation:</h3><ol><li>Most Optimistic Estimate (O):</li></ol><ul><li>This represents the best-case scenario, assuming everything progresses exceptionally well without any hindrances or unexpected issues. It’s the minimum time, effort, or cost required to complete the task.</li></ul><ol><li>Most Pessimistic Estimate (P):</li></ol><ul><li>This indicates the worst-case scenario, considering all potential hurdles, delays, or unforeseen problems that might arise during task completion. It’s the maximum time, effort, or cost expected for the task.</li></ul><ol><li>Most Likely Estimate (M):</li></ol><ul><li>This is a realistic estimate based on past experiences, expert judgment, historical data, or a detailed analysis. It represents the most probable time, effort, or cost required to complete the task under normal conditions.</li></ul><h3>Calculation of Three-Point Estimate:</h3><p>Using the three estimates (O, P, M), the three-point estimation formula calculates the Expected Time (E):</p><p><em>E</em>= (<em>O</em>+4<em>M</em>+<em>P)/6</em>​</p><p>This formula calculates the Expected Time (E) as a weighted average of the three estimates, giving more weight to the most likely estimate (M) while considering the extreme cases represented by the optimistic (O) and pessimistic (P) estimates.</p><h3>Benefits of Three-Point Estimation:</h3><ol><li>Risk Management: Helps in assessing and managing project risks by considering optimistic and pessimistic scenarios.</li><li>Realistic Estimates: Provides a more nuanced view of estimates, considering both best and worst-case scenarios along with a realistic midpoint.</li><li>Improved Accuracy: Increases the accuracy of estimates by incorporating a range of possibilities rather than relying solely on a single-point estimate.</li><li>Decision-Making Support: Assists in decision-making by providing a clearer understanding of potential outcomes and uncertainties.</li></ol><p>The three-point estimation technique is commonly used in project management, especially in methodologies like PERT (Program Evaluation and Review Technique),</p><p><strong>How to secure the code?</strong></p><h3>1. Input Validation and Sanitization:</h3><ul><li>Validate User Input: Ensure all user inputs (from forms, APIs, etc.) are validated and sanitized to prevent injection attacks (like SQL injection, XSS, CSRF).</li></ul><h3>2. Authentication and Authorization:</h3><ul><li>Implement Secure Authentication: Use strong authentication mechanisms like multi-factor authentication (MFA) and implement secure password storage using hashing and salting.</li><li>Authorization Controls: Implement access controls and role-based permissions to restrict user access to sensitive data or functionalities.</li></ul><h3>3. Secure Coding Practices:</h3><ul><li>Follow Best Practices: Adhere to secure coding practices and guidelines (like OWASP Top 10) for secure development, including proper error handling, secure configurations, and avoiding hardcoded credentials.</li><li>Code Reviews: Conduct regular code reviews to identify security flaws and vulnerabilities by peers or security experts.</li></ul><h3>4. Data Encryption:</h3><ul><li>Encrypt Sensitive Data: Encrypt data at rest and in transit using strong encryption algorithms (AES, TLS) to protect sensitive information from unauthorized access.</li></ul><h3>5. Use of Security Libraries and Frameworks:</h3><ul><li>Use Trusted Libraries: Utilize established security libraries and frameworks for authentication, encryption, input validation, and secure communication (such as OWASP ESAPI, Bouncy Castle, etc.).</li></ul><h3>6. Regular Updates and Patching:</h3><ul><li>Keep Dependencies Updated: Regularly update third-party libraries, frameworks, and dependencies to patch known security vulnerabilities.</li></ul><h3>7. Secure Communication:</h3><ul><li>HTTPS Usage: Always use HTTPS to ensure secure communication between clients and servers, preventing man-in-the-middle attacks.</li></ul><h3>8. Security Testing:</h3><ul><li>Static Code Analysis: Use static code analysis tools (like SonarQube, and Checkmarx) to identify security vulnerabilities in the codebase.</li><li>Dynamic Application Security Testing (DAST): Perform dynamic testing to identify vulnerabilities by testing the running application.</li></ul><h3>9. Secure Configuration and Environment:</h3><ul><li>Secure Server Configurations: Harden server configurations, limit unnecessary services, and apply security configurations (firewalls, intrusion detection systems) to protect against attacks.</li></ul><h3>10. Incident Response and Monitoring:</h3><ul><li>Implement Monitoring and Logging: Set up monitoring and logging systems to detect and respond to security incidents promptly.</li><li>Response Plan: Develop an incident response plan to handle security breaches and vulnerabilities effectively.</li></ul><h3>11. Education and Awareness:</h3><ul><li>Training and Awareness: Provide security training to developers and employees to promote security awareness and best practices.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c51ba64683b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Most popular questions for Android]]></title>
            <link>https://medium.com/@ajaymaurya_72779/android-interview-questions-43e973f89be6?source=rss-92035b465e19------2</link>
            <guid isPermaLink="false">https://medium.com/p/43e973f89be6</guid>
            <dc:creator><![CDATA[Ajay Maurya]]></dc:creator>
            <pubDate>Fri, 17 Nov 2023 08:58:55 GMT</pubDate>
            <atom:updated>2023-11-17T09:00:06.740Z</atom:updated>
            <content:encoded><![CDATA[<p>Android is an open-sourced operating system founded by Andy Rubin. It is a Linux-based operating system that allows developers to develop and run apps that can perform both basic and advanced functions.</p><h3>Components of Android application</h3><p>Android application architecture has the list of components given below. They are as follows:</p><ul><li><strong>Services</strong> − It will be used to perform background functionalities.</li><li><strong>Activities</strong> — It is a single screen that represents GUI(Graphical User Interface) with which users can interact to do something like dial the phone, view email, etc.</li><li><strong>Broadcast receivers </strong>— Broadcast receiver is a mechanism used for listening to system-level events like listening for incoming calls, SMS, etc. by the host application.</li><li><strong>Content providers</strong> − This will share the data between various applications.</li></ul><h3>Scope of Android</h3><p>We need Android in the mobile market because it helps smartphone users to download applications that can give different services.</p><p>Android developers can publish their apps on different platforms like SlideME, Mobango, Amazon app store, Opera mobile store, etc. Most of these platforms or markets are free. Such platforms are creating a huge market for Android mobile application development in India.</p><p>“); filter: grayscale(100%); transition: filter 0.1s cubic-bezier(0, 0, 0.2, 1) 0s, -webkit-filter 0.1s cubic-bezier(0, 0, 0.2, 1) 0s;”&gt;Play</p><h3>Advantages of Android</h3><ul><li>Open-source: It means no license, development, and distribution fee.</li><li>Platform-independent: Android development platform(Android studio &amp; Android SDK) is platform-independent. Android applications can be developed on any operating system with the help of Android studio &amp; Android SDK.</li><li>Highly optimized virtual machine: Android uses a highly optimized virtual machine i.e, DVM (Dalvik Virtual Machine) for mobile devices. Replacing DVM, ART(Android RunTime) virtual machine was introduced to execute android apps from Android lollipop 5.0 version (API level 21).</li><li>Supports various technologies: It supports camera, speech, BlueTooth, Wifi, EDGE, etc. technologies.</li><li>Millions of available apps: Millions of Android apps are available that you can install on the device from the Google Play store as well as from other alternative stores.</li></ul><h3>Disadvantages of Android</h3><ul><li>Fake applications: There are thousands of fake applications available on the market, which when installed may try to steal your data.</li><li><strong>Streamlining issues:</strong></li><li>There are various kinds of Android devices available in the market with different screen sizes and dimensions, but more importantly, different Android operating systems.</li><li>An application that runs smoothly on one version of the Android OS might crash on another Android OS.</li><li><strong>Background processes:</strong></li><li>In the older version of Android, most applications always run in the background and come to the foreground as they wish. From the Android 8.0 version, apps that are running in the background now have limits on how freely they can access background services.</li><li>As few apps run in the background, they consume mobile battery and your device battery vanishes quickly.</li><li>Poor data connection: Android phones have a large number of background processes that keep on running in the background and it results in excess usage of data and poor internet speed. Sometimes it can be very annoying.</li></ul><h3>1. What is Android?</h3><p>Android is an open-sourced operating system that is used on mobile devices, such as mobiles and tablets. The Android application executes within its own process and its own instance of Dalvik Virtual Machine(DVM) or Android RunTime(ART).</p><p><strong>2. What are the features of Android architecture?</strong></p><p>Android architecture refers to the various layers in the Android stack. It consists of operating systems, middleware, and applications. Each layer in the Android architecture gives different services to the layer just above it.</p><p>The five layers present in the Android stack are:</p><ul><li>Linux Kernel — It is responsible for device drivers, device management, memory management, power management, and resource access.</li><li>Libraries — There are a set of libraries having open-source Web browser engine WebKit, well-known library libc, libraries to play and record audio and video, SQLite database for sharing of application data and storage, SSL libraries for internet security, etc.</li><li>Android Runtime — There are core libraries along with DVM (Dalvik Virtual Machine) or ART(Android RunTime) as runtime which is helpful for running an Android application. DVM is optimized for mobile devices. DVM provides fast performance and consumes less memory. Replacing DVM, ART(Android RunTime) virtual machine was introduced to execute android apps from Android lollipop 5.0 version (API level 21).</li><li>Android Framework — It consists of Android APIs like UI (User Interface), resources, content providers (data), locations, telephony, and package managers. It provides interfaces and classes for the development of Android applications.</li><li>Android Applications — Applications like home, games, contacts, settings, browsers, etc. uses the Android framework that will make use of Android runtime and libraries.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AzQNHmUe-okg-3s1" /></figure><h3>3. List the languages used to build Android.</h3><p>The most popular programming languages that can be used to develop applications in Android are:</p><ul><li>Java: It has always been a starting point for new developers and used by the majority of people who work with Android development. Eclipse, NetBeans, and IntelliJ IDE are the most popular IDE’s(Integrated Development Environment) used for developing an Android application using java.</li><li>Kotlin: Kotlin is a relatively new, modern, safe, and object-oriented cross-platform programming language used in developing an Android application. IDE’s used with kotlin are Android studio, Eclipse IDE, etc.</li><li>C#: Developers can build native iOS and Android mobile applications by using the C# language. Visual Studio is the best tool for developing an Android application using C#.</li><li>Python: It is a dynamic and object-oriented programming language. It is very popular in machine learning. Pydroid 3, Dcoder, spck code editor is some of the code editors for Python.</li><li>Other languages which can be used in Android development are C++, HTML 5. C4droid, CppDroid, AIDE, etc. are IDE’s for C++. Acode, spck code editor, etc. are examples of IDE’s used with HTML.</li></ul><p>You can download a PDF version of Android Interview Questions.</p><p>Download PDF</p><h3>4. What is an activity?</h3><p>Activity in java is a single screen that represents GUI(Graphical User Interface) with which users can interact in order to do something like dial the phone, view email, etc.</p><p>For example, the Facebook start page where you enter your email/phone number and password to log in acts as an activity.</p><h3>5. What is a service in Android?</h3><p>Service is an application component that facilitates an application to run in the background in order to perform long-running operations without user interaction. A service can run continuously in the background even if the application is closed or even after the user switches to another application.</p><h3>6. Differentiate Activities from Services.</h3><p>Activities can be terminated or closed anytime the user wishes. On the other hand, services are designed to run in the background, and they can act independently.</p><p>Most of the services run continuously, irrespective of whether there are certain or no activities being executed.</p><p>ActivitiesServicesThey are designed to run in the foreground.These are mainly designed to run in the background. Foreground services are also available.Used when the user interface is necessary.Used when the user interface is not necessary.They are dependent.They act independently.</p><h3>7. What is Google Android SDK? Which are the tools placed in Android SDK?</h3><p>The Google Android SDK is a toolset used by developers to write applications on Android-enabled devices.</p><p>The tools placed in Android SDK are given below:</p><ul><li>Android Emulator — Android Emulator is a software application that simulates Android devices on your computer so that you can test the application on a variety of devices and Android API levels without having each physical device.</li><li>DDMS(Dalvik Debug Monitoring Services) — It is a debugging tool from the Android software development kit (SDK) which provides services like message formation, call spoofing, capturing screenshots, etc.</li><li>ADB(Android Debug Bridge) — It is a command-line tool used to allow and control communication with the emulator instance.</li><li>AAPT(Android Asset Packaging Tool) — It is a build tool that gives the ability to developers to view, create, and update ZIP-compatible archives (zip, jar, and apk).</li></ul><p>Advance your career with <strong>Mock Assessments</strong></p><p>Real-world coding challenges for top company interviews</p><p>Real-Life Problems</p><p>Detailed reports</p><p>Attempt Now</p><h3>8. What is the use of Bundle in Android?</h3><p>Bundles are used to pass the required data between various Android activities. These are like HashMap that can take trivial data types. Below code shows how to transfer a piece of data by using bundle:</p><pre>Bundle b=new Bundle();<br>b.putString(&quot;Email&quot;,&quot;abc@xyz.com&quot;);<br>i.putExtras(b); // where i is intent</pre><h3>9. What is an Adapter in Android?</h3><p>An adapter in Android acts as a bridge between an AdapterView and the underlying data for that view. The adapter holds the data and sends the data to the adapter view, the view can take the data from the adapter view and shows the data on different views like a spinner, list view, grid view, etc.</p><h3>10. What is AAPT?</h3><p>AAPT stands for Android Asset Packaging Tool. It is a build tool that gives the ability to developers to view, create, and update ZIP-compatible archives (zip, jar, and apk). It parses, indexes, and compiles the resources into a binary format that is optimized for the platform of Android.</p><h3>11. What is portable Wi-Fi hotspot?</h3><p>Portable Wi-Fi Hotspot permits you to share your mobile internet connection with other wireless devices. For example, using your Android phone as a Wi-Fi hotspot, you can use your laptop to connect to the internet using that access point.</p><h3>12. What is Android Debug Bridge(ADB)?</h3><p>Android Debug Bridge is a command-line tool used to allow and control communication with an emulator instance. It gives the power for developers to execute remote shell commands to run applications on an emulator.</p><p>Get Access to 250+ Guides with Scaler Mobile App!</p><p>Experience free learning content on the Scaler Mobile App</p><p>4.5</p><p>100K+</p><p>Play Store</p><h3>13. What is DDMS?</h3><p>DDMS(Dalvik Debug Monitor Server) is a debugging tool in the Android platform. It gives the following list of debugging features:</p><ul><li>Port forwarding services.</li><li>Thread and heap information.</li><li>Logcat.</li><li>Screen capture on the device.</li><li>Network traffic tracking.</li><li>Incoming call and SMS spoofing.</li><li>Location data spoofing.</li></ul><h3>14. What is AIDL? Which data types are supported by AIDL?</h3><p>AIDL(Android Interface Definition Language) is a tool that handles the interface requirements between a client and a service for interprocess communication(IPC) to communicate at the same level.</p><p>The process involves dividing an object into primitives that are understood by the Android operating system. Data Types supported by AIDL is as follows:</p><ul><li>String</li><li>List</li><li>Map</li><li>CharSequence</li><li>Java data types (int, long, char, and boolean)</li></ul><h3>Android Intermediate Questions</h3><h3>1. What is the life cycle of Android activity?</h3><ul><li>OnCreate(): It is called when activity is created. Using this, the views are created and data is collected from bundles.</li><li>OnStart(): It is called if the activity is becoming visible to the user. It may be succeeded by onResume() if the activity comes to the foreground, or onStop() if it becomes hidden.</li><li>OnResume(): It is called when the activity will start an interaction with the user.</li><li>OnPause(): This is called when the activity is moving to the background but hasn’t been killed yet.</li><li>OnStop(): This is called when an activity is no longer visible to the user.</li><li>OnDestroy(): This is called when the activity is finished or destroyed.</li><li>OnRestart(): This is called after the activity has been stopped, prior to it being started again.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EU1FLmb7HUoLxC-V" /></figure><h3>2. Explain Sensors in Android.</h3><p>Android-based devices have a collection of built-in sensors in them, which measure certain parameters like motion, orientation, and many more through their high accuracy. The sensors can be both hardware and software based on nature. There are three prominent categories of sensors in Android devices. They are:</p><ul><li>Position Sensor: It is used for measuring the physical position of the Android device. This has orientation sensors and magnetometers.</li><li>Motion Sensors: These sensors consist of gravity, rotational activity, and acceleration sensors which measure the rotation of the device or the acceleration, etc.</li><li>Environmental Sensor: It includes sensors that measure temperature, humidity, pressure, and other environmental factors.</li></ul><h3>3. Explain the dialog boxes supported on Android.</h3><p>Android supports four dialog boxes. They are:</p><ul><li>AlertDialog:</li><li>The AlertDialog supports 0–3 buttons, along with a list of selectable items such as checkboxes and radio buttons.</li><li>It is used when you want to ask the user about taking a decision between yes or no in response to any particular action taken by the user, by remaining in the same activity and without changing the screen.</li><li>DatePickerDialog:</li><li>It is used for selecting the date by the user.</li><li>TimePickerDialog:</li><li>Used for selecting the time by the user.</li><li>ProgressDialog:</li><li>It is an extension of the AlertDialog and is used to display a progress bar. It also supports the addition of buttons.</li><li>This class was deprecated in API level 26 because it prevents the user from interacting with the application. Instead of this class, we can use a progress indicator such as ProgressBar, which can be embedded in the user interface of your application.</li></ul><h3>4. What is AndroidManifest.xml file and why do you need this?</h3><ul><li>The AndroidManifest.xml file contains information regarding the application that the Android system must know before the codes can be executed.</li><li>This file is essential in every Android application.</li><li>It is declared in the root directory.</li><li>This file performs several tasks such as:</li><li>Providing a unique name to the java package.</li><li>Describing various components of the application such as activity, services, and many more.</li><li>Defining the classes which will implement these components.</li></ul><h3>5. What is an intent?</h3><p>An intent is a messaging object that is used to request an action from other components of an application. It can also be used to launch an activity, send SMS, send an email, display a web page, etc.</p><p>It shows notification messages to the user from within an Android-enabled device. It alerts the user of a particular state that occurred. There are two types of intents in Android:</p><ul><li>Implicit Intent- Used to invoke the system components.</li><li>Explicit Intent- Used to invoke the activity class.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_p2TYB-U0BBY0XjW" /></figure><h3>6. Mention the difference between class, file and activity in Android?</h3><p>The difference between them is as follows:</p><ul><li>Class is a compiled form of a .java file that Android uses to produce an executable .apk file.</li><li>A file is a block of arbitrary information or resources used for storing information. It can be of any file type.</li><li>Activity is a single screen that represents GUI(Graphical User Interface) with which users can interact in order to do something like dial the phone, view email, etc.</li></ul><h3>7. What is a Toast? Write its syntax.</h3><p>Toast is a message that pops up on the screen. It is used to display the message regarding the status of the operation initiated by the user and covers only the expanse of space required for the message while the user’s recent activity remains visible and interactive.</p><p>Toast notification automatically fades in and out and it does not accept interaction events.</p><p><strong>Syntax:</strong></p><pre>Toast.makeText(ProjectActivity.this, &quot;Your message here&quot;, Toast.LENGTH_LONG).show();</pre><h3>8. What is context?</h3><p>The context in Android is the context of the current state of the application or object. The context comes with services like giving access to databases and preferences, resolving resources, and more.</p><p>There are two types of context. They are:</p><p><strong>Activity context</strong></p><ul><li>This activity context is attached to the lifecycle of an activity.</li><li>The activity context can be used when you are passing the context in the scope of an activity or you need the context whose lifecycle is attached to the context of the activity.</li></ul><p><strong>Application context:</strong></p><ul><li>This application context is attached to the lifecycle of an application.</li><li>The application context should be used where you need a context whose lifecycle is separate from the current context or when you are passing a context beyond the scope of activity.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pfGPIJDh_cTu1kDN" /></figure><h3>9. Explain the difference between Implicit and Explicit Intent.</h3><p>The difference between the implicit and explicit Intents are given below:</p><p><strong>Explicit Intent:</strong></p><p>An Explicit Intent is where you inform the system about which activity should handle this intent. Here target component is defined directly in the intent.</p><p>For example,</p><pre>Intent i = new Intent(this, Activitytwo.class); #ActivityTwo is the target component<br>i.putExtra(&quot;Value1&quot;,&quot;This is ActivityTwo&quot;); <br>i.putExtra(&quot;Value2&quot;,&quot;This Value two for ActivityTwo&quot;); <br>startactivity(i);</pre><p><strong>Implicit Intent:</strong></p><p>An Implicit Intent permits you to declare the action you want to carry out. Further, the Android system will check which components are registered to handle that specific action based on intent data. Here target component is not defined in the intent.</p><p>For example,</p><pre>Intent i = new Intent(ACTION_VIEW,Uri.parse(&quot;http://www.interview bit.com&quot;)); <br>startActivity(i);</pre><h3>10. What is ANR in Android? What are the measures you can take to avoid ANR?</h3><p>ANR(Application is Not Responding) is a dialog box that appears when the application is not responding. This ANR dialogue is displayed whenever the main thread within an application has been unresponsive for a long time under the following conditions:</p><ul><li>When there is no response to an input event even after 5 seconds.</li><li>When a broadcast receiver has not completed its execution within 10 seconds.</li></ul><p>Following measures can be taken to avoid ANR:</p><ul><li>An application should perform lengthy database or networking operations in separate threads to avoid ANR.</li><li>For background task-intensive applications, you can lessen pressure from the UI thread by using the IntentService.</li></ul><h3>11. What are the troubleshooting techniques you can follow if an application is crashing frequently?</h3><p>If an Android application is crashing frequently, you can follow the below-given techniques:</p><p><strong>Compatibility Check:</strong></p><p>It is not possible to test an application for all kinds of devices and operating systems. There might be a possibility that an application is not compatible with your OS.</p><p><strong>Memory Management:</strong></p><ul><li>Some apps run perfectly on one mobile device but might crash on other devices. This is where processing power, memory management, and CPU speed are considered.</li><li>As there is a limited amount of memory space on mobile devices, you can free up memory space for the application to function properly.</li><li>If an application is frequently crashing, you can delete the application’s data, which will clear its cache memory and allow some free space on your device and might boost the app’s performance.</li></ul><h3>12. Explain different launch modes in Android.</h3><p>The different launch modes in Android are given below:</p><p><strong>Standard:</strong></p><ul><li>This launch mode generates an activity’s new instance in the task from which it originated.</li><li>It is possible to create several instances for the same activity.</li><li>For Example, suppose our current stack is A -&gt; B -&gt; C. Now, if we launch activity B again with the “standard” launch mode, then the new stack will be A -&gt; B -&gt; C -&gt; B.</li></ul><p><strong>SingleTop:</strong></p><ul><li>This launch mode is similar to the Standard launch mode except if there exists an activity’s previous instance on the top of the stack, then a new instance will not be created.</li><li>But the intent will be sent to the activity’s existing instance.</li><li>For example, suppose our current stack is A -&gt; B -&gt; C. Now, if we launch the activity B again with “singleTop” launch mode,then the new stack will be A -&gt; B -&gt; C -&gt; B.</li><li>Consider another example, where the current stack is A -&gt; B -&gt; C. Now, if we launch activity C again with the “singleTop” launch mode, then the stack will remain the same i.e., A -&gt; B -&gt; C. The intent will be passed to the onNewIntent() method.</li></ul><p><strong>SingleTask:</strong></p><ul><li>This launch mode will create a new task and push a new instance to the task as the root.</li><li>For example, suppose our current stack is A -&gt; B -&gt; C -&gt; D. Now, if we launch activity B again with the “singleTask” launch mode, then the new stack will be A -&gt; B. Here, a callback has been received on the old instance and C and D activities are destroyed.</li></ul><p><strong>SingleInstance:</strong></p><ul><li>This launch mode is similar to the SingleTask launch mode. But the system doesn’t support launching any new activities in the same task.</li><li>In a situation where the new activity is launched, it is launched in a separate task.</li><li>For example, Suppose our current stack is A -&gt; B -&gt; C. Now, if we launch the activity D with the “singleInstance” launch mode, then there will be two stacks:</li><li>A -&gt; B -&gt; C</li><li>D, If you call activity E, then it will be added to the first stack.</li><li>A -&gt; B -&gt; C -&gt; E</li><li>D</li></ul><p>Again if you Call the activity D, then it will call the same activity from the 2nd stack and pass the intent to onNewIntent().</p><h3>13. What are containers?</h3><p>Containers carry objects and widgets together, based on which specific items are required and in what particular arrangement is needed. Containers may hold labels, buttons, fields, or even child containers, etc. For example, if you want a form with fields on the left and labels on the right, you will need a container. If you want the OK and Cancel buttons to be below the rest of the form, next to one another, and flush to the right side of the screen, you will need a container. If you have several widgets, you will need a container to have a root element to place the widgets inside.</p><p>Android provides a collection of view classes that serve as containers for views. These container classes are called layouts, which are defined in the form of XML files that cannot be changed by our code during execution. The layout managers provided by Android SDK are LinearLayout, RelativeLayout, FrameLayout, AbsoluteLayout, GridLayout, and TableLayout.</p><h3>14. What is the role of Dalvik in Android development?</h3><p>Dalvik serves as a virtual machine, and it is responsible for running every Android application. Because of Dalvik, a device will have the ability to execute multiple instances of virtual machines efficiently through better memory management.</p><h3>15. What is the latest version of Android? List all the versions of Android.</h3><p>Here is a list of some major Android versions and some notable features introduced with each:</p><ol><li>Android 1.0 (2008):</li></ol><ul><li>Features: Basic smartphone functionalities, Google Apps integration.</li></ul><ol><li>Android 1.5 Cupcake (2009):</li></ol><ul><li>Features: On-screen keyboard, video recording, and playback.</li></ul><ol><li>Android 1.6 Donut (2009):</li></ol><ul><li>Features: Improved search, support for different screen sizes.</li></ul><ol><li>Android 2.0/2.1 Éclair (2009):</li></ol><ul><li>Features: Improved user interface, multiple account support, HTML5 support in the browser.</li></ul><ol><li>Android 2.2 Froyo (2010):</li></ol><ul><li>Features: Improved performance, support for Adobe Flash, USB tethering.</li></ul><ol><li>Android 2.3 Gingerbread (2010):</li></ol><ul><li>Features: Improved UI, NFC support, front-facing camera support.</li></ul><ol><li>Android 3.0/3.1/3.2 Honeycomb (2011):</li></ol><ul><li>Features: Optimized for tablets, holographic UI design.</li></ul><ol><li>Android 4.0 Ice Cream Sandwich (2011):</li></ol><ul><li>Features: Unified UI for smartphones and tablets, Face Unlock, Android Beam.</li></ul><ol><li>Android 4.1/4.2/4.3 Jelly Bean (2012):</li></ol><ul><li>Features: Project Butter for smoother UI, Google Now, Photo Sphere.</li></ul><ol><li>Android 4.4 KitKat (2013):</li></ol><ul><li>Features: Improved performance on lower-end devices, immersive mode, OK Google.</li></ul><ol><li>Android 5.0/5.1 Lollipop (2014):</li></ol><ul><li>Features: Material Design, enhanced notifications, multiple user accounts.</li></ul><ol><li>Android 6.0 Marshmallow (2015):</li></ol><ul><li>Features: App permissions, Doze mode for improved battery life, Google Now on Tap.</li></ul><ol><li>Android 7.0/7.1 Nougat (2016):</li></ol><ul><li>Features: Multi-window support, Direct Reply for notifications, Daydream VR.</li></ul><ol><li>Android 8.0/8.1 Oreo (2017):</li></ol><ul><li>Features: Picture-in-Picture mode, Autofill API, Notification Dots.</li></ul><ol><li>Android 9.0 Pie (2018):</li></ol><ul><li>Features: Gesture-based navigation, Adaptive Battery, Digital Wellbeing.</li></ul><ol><li>Android 10 (2019):</li></ol><ul><li>Features: System-wide dark mode, improved privacy controls, gesture navigation.</li></ul><ol><li>Android 11 (2020):</li></ol><ul><li>Features: Chat Bubbles, Conversation notifications, One-time permissions.</li></ul><ol><li>Android 12 (2021):</li></ol><ul><li>Features: Material You design language, Quick Settings revamp, improved privacy indicators.</li></ul><h3>1. What are broadcast receivers? How is it implemented?</h3><p>A broadcast receiver is a mechanism used for listening to system-level events like listening for incoming calls, SMS, etc. by the host application. It is implemented as a subclass of BroadcastReceiver class and each message is broadcasted as an intent object.</p><pre>public class MyReceiver extends BroadcastReceiver <br>{<br>    public void onReceive(context,intent){}<br>}</pre><h3>2. Explain in detail the important file and folders used when you create a new Android application.</h3><p><strong>App:</strong></p><p>It describes the basic characteristics of the application and defines each of its components.</p><p><strong>java:</strong></p><ul><li>This contains the .java source files and .kt(source code written in Kotlin) source files of your project. By default, it includes a MainActivity.java or MainActivity.kt source file.</li><li>You create all the activities which have .java and .kt extensions under this file and also it includes all the code behind the application.</li></ul><p><strong>res:</strong></p><ul><li>It is used to store the values for the resources that are used in various Android projects to include features of color, styles, dimensions, etc.</li><li>It is a directory for files like styles.xml, strings.xml, colors.xml, dimens.xml, etc.</li></ul><p><strong>Scripts:</strong></p><p>This is an auto-generated file that consists of compileSdkVersion, buildToolsVersion, minSdkVersion, targetSdkVersion, applicationId, versionCode, and versionName. For example, build.gradle is a script file placed in the root project directory, defines build configurations that will be applied to all modules in your project.</p><h3>3. What is the difference between Serializable and Parcelable? Which is the best approach in Android?</h3><p>While developing applications usually it needs to transfer data from one activity to another. This data needs to be added into a corresponding intent object. Some additional actions are required to make the data suitable for transfer. For doing that the object should be either serializable or parcelable.</p><p><strong>Serializable:</strong></p><ul><li>Serializable is a standard Java interface. In this approach, you simply mark a class Serializable by implementing the interface and java will automatically serialize it.</li><li>Reflection is used during the process and many additional objects are created. This leads to plenty of garbage collection and poor performance.</li></ul><p><strong>Parcelable:</strong></p><ul><li>Parcelable is an Android-specific interface. In this approach, you implement the serialization yourself.</li><li>Reflection is not used during this process and hence no garbage is created.</li><li>Parcelable is far more efficient than Serializable since it gets around some problems with the default Java serialization scheme. Also, it is faster because it is optimized for usage on the development of Android, and shows better results.</li></ul><h3>4. What database is used in Android? How it is different from client-server database management systems?</h3><p>SQLite is the open-source relational database used in Android. The SQLite engine is serverless, transactional, and also self-contained. Instead of the client-server relationship of most database management systems, the SQLite engine is integrally linked with the application. The library can be called dynamically and it can make use of simple function calls that reduce latency in database access.</p><h3>5. What are the differences between Service and Thread?</h3><p>The main difference between Service and Thread is given below:</p><p>ServiceThreadService is an application component that facilitates an application to run in the background in order to perform long-running operations without user interaction. A Thread is a concurrent unit of execution.It exposes few functionalities to other applications by calling Context.bindService().Google has brought in handlers and loopers into threads.When an application is killed, service is not killed.When an application is killed, the thread is killed.</p><h3>6. What is the content provider? How it is implemented?</h3><p>Content provider is one of the primary building blocks of Android applications, which manages access to a central repository of data. It acts as a standard interface that connects data in one process with code running in another process. So it can be used to share the data between different applications.</p><p>They are responsible for encapsulating the data and providing mechanisms for defining data security. It is implemented as a subclass of ContentProviderclass and must implement a set of APIs that will enable other applications to perform transactions.</p><pre>public class MyContentprovider extends ContentProvider <br>{<br> public void onCreate(){}<br>}</pre><h3>7. What is the significance of the .dex file?</h3><p>Android programs are compiled into a .dex file (Dalvik Executable file) by DVM, which are then zipped into a .apk file on the device. .dex files are created by translating compiled applications written in java. .dex is a format that is optimized for effective storage and memory-mappable executions.</p><h3>8. What is the difference between compileSdkVersion and targetSdkVersion?</h3><p><strong>compileSdkVersion:</strong></p><ul><li>The compileSdkVersion is the version of API the application is compiled against. You can use Android API features involved in that version of the API (as well as all previous versions).</li><li>For example, if you try and use API 15 features but set compileSdkVersion to 14, you will get a compilation error. If you set compileSdkVersion to 15 you can still run the app on an API 14 device as long as your app’s execution paths do not attempt to invoke any APIs specific to API 15.</li></ul><p><strong>targetSdkVersion:</strong></p><ul><li>The targetSdkVersion indicates that you have tested your app on (presumably up to and including) the version you specify. This is like a certification or sign-off you are giving the Android OS as a hint to how it should handle your application in terms of OS features.</li><li>For example, setting the targetSdkVersion value to “11” or higher permits the system to apply a new default theme (Holo) to the application when running on Android 3.0 or higher. It also disables screen compatibility mode when running on larger screens (because support for API level 11 implicitly supports larger screens).</li></ul><h3>9. Explain about java classes related to the use of sensors on Android.</h3><p>Android sensor API provides many classes and interface for the use of sensors on Android. The important classes and interfaces of sensor API are given below:</p><ul><li><strong>Sensor class:</strong> This class helps you to create an instance of a specific sensor. It provides methods that let you determine a sensor’s capabilities.</li><li><strong>SensorManager class:</strong> This class is used to create an instance of the sensor service. It provides methods to access and list sensors, to register and unregister sensor listeners, etc.</li><li><strong>SensorEvent class:</strong> This Java class is used to create a sensor event object. It provides information about the sensor event including raw sensor data, the accuracy of data, type of sensor, timestamp of event, etc.</li><li><strong>SensorEventListener interface:</strong> This interface is used to create two callback methods that receive sensor event notifications when sensor value changes or when sensor accuracy changes. Those two methods are void onAccuracyChanged(Sensor sensor, int accuracy) which is called when sensor accuracy is changed and<br>void onSensorChanged(SensorEvent event) which is called when sensor values are changed.</li></ul><h3>10. What is JobScheduler?</h3><p>The JobSchedular API is used for scheduling different types of jobs against the framework that will be executed in your app’s own process. This allows your application to perform the given task while being considerate of the device’s battery at the cost of timing control.</p><p>The JobScheduler supports batch scheduling of jobs. The Android system can combine jobs for reducing battery consumption. JobManager automatically handles the network unreliability so it makes handling uploads easier.</p><p>Here is some example of a situation where you would use this job scheduler:</p><ul><li>Tasks that should be done when the device is connected to a power supply.</li><li>Tasks that require a Wi-Fi connection or network access.</li><li>Tasks should run on a regular basis as a batch where the timing is not critical.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43e973f89be6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android-Specific Interview Questions]]></title>
            <link>https://medium.com/@ajaymaurya_72779/android-specific-interview-questions-deb485486e9e?source=rss-92035b465e19------2</link>
            <guid isPermaLink="false">https://medium.com/p/deb485486e9e</guid>
            <dc:creator><![CDATA[Ajay Maurya]]></dc:creator>
            <pubDate>Thu, 09 Nov 2023 09:12:53 GMT</pubDate>
            <atom:updated>2023-11-09T09:12:53.932Z</atom:updated>
            <content:encoded><![CDATA[<ol><li><strong>*What is Android?*</strong>:</li></ol><p>Android is an open-source mobile operating system based on the Linux kernel. It is designed primarily for touchscreen mobile devices such as smartphones and tablets.</p><p>2. <strong>*Explain the Android application architecture*</strong>:</p><p>The Android application architecture consists of four main components:</p><ul><li><strong>Activities</strong>: User interface screens in Android.</li><li><strong>Services</strong>: Background processes that run without a user interface.</li><li><strong>Broadcast Receivers:</strong> Respond to system-wide events or broadcasts.</li><li><strong>Content Providers</strong>: Manage shared data between applications.</li></ul><p>In Architectural Linux kernel, Libraries, Android Runtime, and Applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*nz_Vt9-yU2JA5vUx.jpg" /></figure><p><strong>3. *What is an Activity in Android?*: </strong>An Activity represents a single screen with a user interface in an Android application. It is the entry point for interacting with the user and manages the UI lifecycle and user interactions.</p><p>4.<strong> *What is a Fragment in Android?*:</strong> A Fragment is a modular section of a user interface in an Android application. It represents a portion of a user interface or behavior that can be combined with other fragments to create a multi-pane UI or reused within different activities.</p><p>5. <strong>*What is an Intent in Android?*:</strong> An Intent is a messaging object used to communicate between components in an Android application. It can be used to start activities, start services, deliver broadcasts, and more.</p><p>6.<strong> *Explain the activity lifecycle in Android*:</strong> The activity lifecycle in Android consists of several callback methods that are invoked as an activity transitions between different states, such as being created, paused, resumed, or destroyed.</p><p>The main lifecycle callbacks include</p><p><strong>`onCreate()`, `onStart()`, `onResume()`, `onPause()`, `onStop()`, and `onDestroy()`.</strong></p><p>When configurations change. it cal again by destroying the fragment.</p><p><strong>7. *What is a Content Provider in Android?*</strong>: A Content Provider is a mechanism in Android for managing shared data between applications. It allows applications to securely share data with other applications and provides a consistent interface for data access.</p><p><strong>8. *What is a Service in Android?*:</strong> A Service is a component in Android that runs in the background to perform long-running operations without a user interface. It can be used for tasks such as playing music, downloading files, or performing network operations.</p><p><strong>9. *What is the difference between Service and IntentService?*:</strong> The main difference between Service and IntentService is that IntentService is a subclass of Service that handles asynchronous requests on a worker thread. It automatically stops itself when the work is complete, while a regular Service needs to be manually stopped.</p><p><strong>10. *Explain the difference between Serializable and Parcelable*:</strong></p><p>Serializable and Parcelable are mechanisms in Android for object serialization. The main differences are:</p><ul><li>Serializable is a default Java interface, while Parcelable is an Android-specific interface.</li><li>Parcelable is more efficient in terms of performance and size compared to Serializable.</li><li>Parcelable requires explicit serialization and deserialization implementation, while Serializable handles it automatically.</li></ul><p>pareceller library we can use to create an automate create in-memory automatic parecel.wrap(pareclableObj)</p><p><a href="https://www.youtube.com/watch?v=eImExRyN3vE">https://www.youtube.com/watch?v=eImExRyN3vE</a></p><p>11. *What is the purpose of the AndroidManifest.xml file?*: The AndroidManifest.xml file is a configuration file that describes essential information about an Android application. It contains the application package name, declared activities, services, permissions, hardware requirements, and more.</p><p>12. *What is the difference between dp, sp, px, and dip in Android?*: These are units of measurement used in Android:</p><p>- dp (density-independent pixels) and dip (device-independent pixels) represent a density-independent pixel.</p><p>- px (pixels) represents an exact pixel on the screen.</p><p>- sp (scaled pixels) is used for font sizes and is scaled according to the user’s preferred text size settings.</p><p>13. *Explain the concept of Context in Android*: Context is an Android class that provides access to application-specific resources and services. It represents the current state of an application and allows access to resources such as layouts, strings, and system services.</p><p>14. *What is the use of the ViewHolder pattern in RecyclerView?*: The ViewHolder pattern is used in RecyclerView to improve performance by caching views. It reduces the number of calls to `findViewById()` by keeping references to the views inside the ViewHolder object, allowing for efficient recycling of views in the RecyclerView’s adapter.</p><p><strong>15. *How can you communicate between Fragments in an Activity?*:</strong> Communication between Fragments in an Activity can be achieved through various methods, such as using interfaces, shared ViewModel, EventBus, or the FragmentManager’s `findFragmentById()` or `findFragmentByTag()` methods.</p><p><strong>16. *What is the difference between AsyncTask and ThreadPoolExecutor?*:</strong> AsyncTask and ThreadPoolExecutor are both used for managing background tasks in Android, but they have differences:</p><ul><li>AsyncTask is designed for short and simple background tasks, while ThreadPoolExecutor is more flexible and suitable for long-running or complex tasks</li><li>AsyncTask runs on a single background thread by default, while ThreadPoolExecutor can be configured with multiple threads.</li><li>ThreadPoolExecutor provides more control and customization options compared to AsyncTask.</li></ul><p>ExecutorService Service =Executor.newSingleThreadExecutor()</p><p>Service.execute(new Runnable{</p><p>@Override</p><p>public void run(){</p><p>// background thread</p><p>runUiThread(new Runnable{</p><p>@Override</p><p>public void run(){</p><p>}</p><p>})</p><p>})</p><p><strong>17. *Explain the usage of AsyncTask in Android*: </strong>AsyncTask is a helper class in Android that simplifies the execution of background tasks and the updating of UI components on the main thread.</p><p>It provides methods like</p><p><strong>`doInBackground()`,</strong></p><p><strong>`onPostExecute()`,</strong></p><p><strong>`onProgressUpdate()`,</strong></p><p><strong>`onPreExecute()`</strong></p><p>to perform background operations and update the UI thread.</p><p><strong>18. *What is the importance of the Android Support Library?*: </strong>The Android Support Library is a set of libraries provided by Google to <strong>enhance compatibility across different Android versions</strong>. It includes backward-compatible versions of various Android features and UI components, allowing developers to target a wider range of devices and Android versions.</p><p>19. *How can you persist data in Android? Explain different storage options*: Android provides various storage options for persisting data, including:</p><ul><li><strong>Internal Storage:</strong> Private storage for the app, accessible only to the app itself.</li><li><strong>External Storage:</strong> Public storage accessible by other apps and users, such as an SD card.</li><li>SharedPreferences: Key-value storage for simple data, suitable for storing small amounts of data.</li><li>SQLite Database: A built-in relational database for structured data storage.</li><li>Network-based storage: Cloud storage or remote server storage, accessed through network APIs.</li></ul><p>20. *What are the different ways to handle orientation changes in Android?*: There are multiple ways to handle orientation changes in Android:</p><p>- Using the `onSaveInstanceState()` and `onRestoreInstanceState()` methods to save and restore the state of the activity or fragment.</p><p>- Using the `android:configChanges` attribute in the manifest to prevent the activity from being recreated on orientation change.</p><p>- Handling the configuration changes manually by overriding the `onConfigurationChanged()` method in the activity or fragment.</p><p>These are the answers to the 20 commonly asked Android interview questions. Remember to not only focus on memorizing the answers but also understanding the concepts behind them. Additionally, interview questions can vary, so it’s essential to prepare comprehensively and stay updated with the latest trends and technologies in Android development.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=deb485486e9e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Architectural Component and ViewModel in Android]]></title>
            <link>https://medium.com/@ajaymaurya_72779/architectural-component-and-viewmodel-in-android-237572e09dc4?source=rss-92035b465e19------2</link>
            <guid isPermaLink="false">https://medium.com/p/237572e09dc4</guid>
            <dc:creator><![CDATA[Ajay Maurya]]></dc:creator>
            <pubDate>Sun, 22 Oct 2023 17:12:58 GMT</pubDate>
            <atom:updated>2023-10-24T02:37:14.812Z</atom:updated>
            <content:encoded><![CDATA[<p>Android Architecture Component:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*rzwl-RDlCBgk9Muo.png" /></figure><p>Android jetpack with its architecture components defines some key principles that follow a secure path to develop good and robust Applications.</p><p>Architecture Component:</p><ol><li><strong>Room:</strong></li><li><strong>WorkManager</strong></li><li><strong>Lifecycle</strong></li><li><strong>ViewModel</strong></li><li><strong>LiveData</strong></li><li><strong>Navigation</strong></li><li><strong>Paging</strong></li><li><strong>Data Binding</strong></li></ol><p><strong>Room Component:</strong></p><p>At the beginning of Mobile App development, SQLite is one of the lightweight Database APIs being used. But, It has many drawbacks, It doesn’t check the QUery on Compile time and it was not getting on Been Pojo or Model Entity class. Because, of that, the many boiler platform code to make the SQLite database work in Applications.</p><p><strong>The room has 3 sub-components:</strong></p><ol><li>Entity | 2. DAO (Data Access Object) | 3. Database</li></ol><p><strong>Advantages of Room Component:</strong></p><ul><li>Reduce boilerplate code</li><li>Simplifies database access mechanism</li><li>Easy to implement migrations</li><li>Test-ability is high</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*VoWp6MTVT7dwMNtw.png" /></figure><pre>Room.databaseBuilder(context, DatabaseHelper::class.java, DataBaseName)<br>    .fallbackToDestructiveMigration()<br>    .allowMainThreadQueries()<br>    .build()</pre><h4>WorkManager:</h4><p><strong>API provides the optimal solution to manage the background tasks in Android which are deferrable as well as guaranteed run event device restarted.</strong></p><p>Ontime or periodically run enqueue the work manager.</p><pre>val constraints = Constraints.Builder()<br>    .setRequiresCharging(true)<br>    .setRequiredNetworkType(NetworkType.CONNECTED)<br>    .build()<br>val mWorkManager = WorkManager.getInstance(context)<br>// creating periodic work manager to run and execute the notifications<br>val periodicWorkRequest = PeriodicWorkRequestBuilder&lt;ReminderWorker&gt;(1, TimeUnit.DAYS)<br>    .setConstraints(constraints)<br>    .addTag(&quot;1&quot;)<br>    .build()<br>mWorkManager.enqueue(periodicWorkRequest)</pre><p>&gt; Downloads files in chunks and features of managing the downloaded state even if the device restarted. Because it depends on constrain set in work management requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*AMgn3lPvSPB6De7s.png" /></figure><p><strong>Advantages of WorkManager Component:</strong></p><ul><li>Provides backward compatibility</li><li>Scheduling and chaining of tasks is possible</li><li>Users can keep track of/the status of the tasks.</li></ul><h3>3. Lifecycle-Aware Components</h3><p>Details of the lifecycle state are stored in the lifecycle class. And, it permits other components/objects to observe this state.</p><p>LifeCycle Aware is an Android component that has the ability to observe the changes in the lifecycle of other components and respond accordingly.</p><p><strong>LifecycleObserver by implementing within the desired class can be configured to be lifecycle aware.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*Bczny42RsiJFd-UT.png" /></figure><h3>ViewModel:</h3><p>Its purpose is to hold and manage UI-related data. its main function is to maintain the integrity and allow data to service during configuration changes like screen rotations.</p><p>The key benefits of the ViewModel class are essentially two:</p><ul><li>It allows you to persist UI state.</li><li>It provides access to business logic.</li></ul><h3>Persistence</h3><p>ViewModel allows persistence through both the state that a ViewModel holds and the operations that a ViewModel triggers. This caching means that you don’t have to fetch data again through common configuration changes, such as a screen rotation.</p><h3>Scope:</h3><p>When instantiating ViewModel, we pass an object that implements the ViewModelStoreOwner interface</p><p>private lateinit var viewModel : MyViewModel</p><p>Val viewModelFactory = ViewModelProvider.NewInstanceFactory()</p><p>ViewModel = ViewModelProvider(ViewModelStore(), viewModelFactory).get(CounterViewModel::class.java)</p><p><strong>In ComponentActivity-&gt;</strong></p><p>private val viewModel by viewModels&lt;MainViewModel&gt;()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*XGMpescwQO_rnEAy.png" /></figure><h3>ViewModelsPrpvider:</h3><p>ViewModelProvider.Factory: Implementations of Factory is an interface. It Is responsible for instantiating the ViewModels.</p><p>The first time the <a href="https://developer.android.com/reference/android/arch/lifecycle/ViewModelProviders.html#of(android.support.v4.app.Fragment)">ViewModelProviders.of</a> method is called by MainActivity, it creates a new ViewModel instance</p><p><strong>ViewModelStoreOwner:</strong> It is the responsibility of the implementation of this interface to retain the owned ViewModelStore during the configuration changes and calls. ViewModelStore.clear when the scope is going to be destroyed.</p><p>Observer: A simple callback that can be received from <a href="https://developer.android.com/reference/kotlin/androidx/lifecycle/LiveData">LiveData</a>.</p><p>LiveDataScope: It is an interface that allows controlling a LiveData from a <strong>coroutines block</strong>. emit(Value)-&gt; in Coroutine blocks..</p><p><strong>LifeCycleOwner</strong>: <strong>A class that has an Android lifecycle</strong>. These events can be used by <strong>custom components to handle lifecycle changes without</strong> implementing any code inside the<strong> Activity or the Fragment</strong>.</p><p>DefaultLifecycleObserver:</p><p>Callback interface for listening to <a href="https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleOwner">LifecycleOwner</a> state changes. If a class implements both this interface and <a href="https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleEventObserver">LifecycleEventObserver</a>, then methods of DefaultLifecycleObserver will be called first, and then followed by the call of <a href="https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleEventObserver#onStateChanged(androidx.lifecycle.LifecycleOwner,androidx.lifecycle.Lifecycle.Event)">LifecycleEventObserver.onStateChanged</a></p><p>Class that can receive any lifecycle change and dispatches it to the receiver.</p><p>If a class implements both this interface and <a href="https://developer.android.com/reference/kotlin/androidx/lifecycle/DefaultLifecycleObserver">androidx.lifecycle.DefaultLifecycleObserver</a>, then methods of DefaultLifecycleObserver will be called first, and then followed by the call of <a href="https://developer.android.com/reference/kotlin/androidx/lifecycle/LifecycleEventObserver#onStateChanged(androidx.lifecycle.LifecycleOwner,androidx.lifecycle.Lifecycle.Event)">LifecycleEventObserver.onStateChanged</a></p><p>If a class implements this interface and in the same time uses <a href="https://developer.android.com/reference/kotlin/androidx/lifecycle/OnLifecycleEvent">OnLifecycleEvent</a>, then annotations will be ignored.</p><p>HasDefaultViewModelProviderFactory</p><p>Interface that marks a <a href="https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelStoreOwner">ViewModelStoreOwner</a> as having a default <a href="https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider.Factory">ViewModelProvider.Factory</a> for use with <a href="https://developer.android.com/reference/kotlin/androidx/lifecycle/ViewModelProvider">ViewModelProvider</a>.</p><p><strong>lifecycle-viewmodel-ktx , lifecycle-livedata-ktx, lifecycle-runtime-ktx, core-ktx</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*pBFKT_fiwPGempnV.png" /></figure><p>SaveHandleState: Used in ViewModel to save instance</p><h3>LiveData<strong>:</strong></h3><p>It is the observer which observes the state change whenever the observer state lifecycle is active. LiveData Always check the observer state before making any change to ensure the observer is active to receive it either activity in started or Resumed.</p><p>When the activity destroys the observer&#39;s Lifecycle observer&#39;s state will automatically destroyed. It makes the data synchronization easier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*XRR7Naspn-04f7CC.png" /></figure><h3><strong>Advantages of LiveData component:</strong></h3><ul><li>UI is updated as per the appropriate change in the data</li><li>It removes the stopped or destroyed activities which reduce the chance of app crash</li><li>No memory leaks as LiveData is a lifecycle-aware component.</li></ul><h3><strong>LiveData:</strong></h3><ul><li>LiveData is an observable data holder class, a part of the Android Architecture Components.</li><li>It’s an abstract class, which means you can’t directly create an instance of it. Instead, you should create instances of its subclasses, such as MutableLiveData.</li><li>LiveData is designed to be immutable, which means once you set a value, you can&#39;t change it directly. This immutability helps maintain a clear separation between data modification and data observation.</li><li>It’s commonly used when you want to expose data from a ViewModel to the UI components (like activities or fragments) in a reactive way. UI components can observe the changes in a LiveData object and automatically update themselves when the data changes.</li><li>LiveData is lifecycle-aware, which means it respects the lifecycle of the app&#39;s components, preventing memory leaks by automatically removing observers when they are in the stopped or destroyed state.</li></ul><h3>MutableLiveData:</h3><ul><li>MutableLiveData is a subclass of LiveData and is used for data that can be changed or updated.</li><li>Unlike LiveData, MutableLiveData exposes methods that allow you to modify its data directly. For example, you can use setValue() or postValue() methods to set new values.</li><li>It’s often used within ViewModels or repository classes to hold and manage data that may change during the lifecycle of the application.</li><li>UI components can still observe a MutableLiveData object, but they can&#39;t modify its data directly, which maintains the separation of concerns. Only the owner (usually a ViewModel) can modify the data through the exposed methods.</li></ul><h3>Navigation Component:</h3><p>Single Activity based Application built in Android. It allows to maintain display transitions and back behaviors</p><p>By using the Navigation Component, one can get all the benefits of other Architecture components as well like <strong>Lifecycle</strong> and <strong>ViewModel</strong>. It helps in implementing basic navigation styles like simple <a href="https://www.geeksforgeeks.org/button-in-kotlin/">button</a> clicks to complex navigation patterns like <a href="https://www.geeksforgeeks.org/how-to-change-the-color-of-action-bar-in-an-android-app/">app bar</a> and <a href="https://www.geeksforgeeks.org/navigation-drawer-in-android/">navigation drawer</a>. Further, it also supports deep links and <a href="https://www.geeksforgeeks.org/java-helperclass/">helpers</a> which enables the connection of this component with the navigation drawer and <a href="https://www.geeksforgeeks.org/bottom-navigation-bar-in-android/">bottom navigation</a>.</p><p><strong>Advantages of Navigation Component:</strong></p><ul><li>Ease the transition through animated visualization</li><li>Supports deep linking</li><li>Handle fragment transactions</li><li>Support common as well as a complex navigation pattern</li></ul><p>PAGGING:</p><p>The<strong> </strong><a href="https://www.geeksforgeeks.org/getting-started-with-paging-library-v3-in-android-using-kotlin-coroutines/"><strong>Paging library</strong></a> of the Android architecture component provides the optimal solution to these issues. This library provides the facility to load the application data slowly and in a cautious manner. Moreover, paging is a very cooperative library for those applications in which the displayed data is updating continuously as it provides a list of <strong>unbounded sites</strong> as well as <strong>large but bounded lists</strong>. Following are the three common ways of loading data through the paging library:</p><ol><li>Loading data is stored in the device database</li><li>Loading data over a network by serving as a cache for the database</li><li>Load data by serving from the back-end server</li></ol><p><strong>Advantages of Paging component:</strong></p><ul><li>Easy to integrate with Recycler View in order to display a large data set.</li><li>Compatible with LiveData and RxJava for updating the UI data</li><li>Loads data gradually with caution</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/0*jxuozuVj2u_v8Es6.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/0*aslEfgCJTUNuYh5r.png" /></figure><p><a href="https://www.geeksforgeeks.org/viewmodel-in-android-architecture-components/">ViewModel in Android Architecture Components - GeeksforGeeks</a></p><p><a href="https://www.geeksforgeeks.org/jetpack-architecture-components-in-android/">https://www.geeksforgeeks.org/jetpack-architecture-components-in-android/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=237572e09dc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JetPack]]></title>
            <link>https://medium.com/@ajaymaurya_72779/jetpack-c205f375eeaa?source=rss-92035b465e19------2</link>
            <guid isPermaLink="false">https://medium.com/p/c205f375eeaa</guid>
            <dc:creator><![CDATA[Ajay Maurya]]></dc:creator>
            <pubDate>Fri, 13 Oct 2023 05:18:31 GMT</pubDate>
            <atom:updated>2023-10-13T05:18:31.298Z</atom:updated>
            <content:encoded><![CDATA[<h3>JetPackCompose</h3><p>Android JetpackCompose:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dQ2QJYrCzMmPfXXpcGt8pw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x9I-E0OQsJSY3Qgo1KICVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zKTeV7SeBYaXUoyN9TDAHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nIEOUA7w9-uXXcdp51cKiw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-t945I5OKKTXj3ZYDrNmgw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JvlolrEM2JJizZejh2ytYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Sq1ALpn0-OJuTko0OrV1g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L76pHTwGJK-cY0hQIiCBAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YI--f9MOLiPmv035hNCuag.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hVXRjedW4tYaxPwnon8bfg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*12cmHiqb33qCtftw_dn2jQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Aes-ugQwwRAIeCaU-bZGwQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wyU7P1CejfrCy3zgQpHng.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tFPkIPVvwjQuL1BqT99F4g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fHGF5ne6oFpjk6Fz5zKi4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mFMdzQu7mxdw3OhIN1Nmxg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dwAw_6-TgI-esCAEy6BzPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z8_YHr3PItjq0ZpQj12dGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zZeI-Om8KiIvFPe8t12HAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zFZZVo1wcliBp_E6xEskaQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T_7QoVGBOPfdO-31Vklzjg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RduTpZxjQ03X8Gok7FVzQQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qyh2MofTQrFU82jPR6NJLw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gN47oF6UpkAkF8vTCYM6ew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lUCsAAAaDeIXLlXHvTJIeA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gaad-x0tUHRBvzGXcCn8lg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VxktBdOvRQ88PfotcZjmPQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c205f375eeaa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>