All Projects → hellosagar → android-interview-questions

hellosagar / android-interview-questions

Licence: MIT license
I'm contributing to help others!

Projects that are alternatives of or similar to android-interview-questions

WizardX
Fast build efficient Android: Fast building, high quality, and efficient Android App infrastructure scaffolding right out of the box(快速构建、高质量、高效率Android App应用开箱即用的基础脚手架)
Stars: ✭ 115 (+379.17%)
Mutual labels:  android-architecture, mvvm-architecture, mvvm-android
Android Mvp Mvvm Flytour
🔥🔥🔥 FlyTour是Android MVVM+MVP+Dagger2+Retrofit+RxJava+组件化+插件组成的双编码架构+双工程架构+双语言Android应用开发框架,通过不断的升级迭代该框架已经有了十个不同的版本,5.0之前工程架构采用gradle配置实现组件化,5.0之后的工程架构采用VirtualAPK实现了插件化,5.0之前采用Java编码实现,5.0之后采用Kotlin编码实现,编码架构由MVVM和MVP组成,工程架构和编码架构及编码语言开发者可根据自己具体的项目实际需求去决定选择使用,该框架是Android组件化、Android插件化、Android MVP架构、Android MVVM架构的集大成者,帮助你快速的搭建自己的App项目开发框架,以便把主要的精…
Stars: ✭ 2,948 (+12183.33%)
Mutual labels:  android-architecture, mvvm-architecture, mvvm-android
GithubTrendingRepos
Android - MVVM with Clean Architecture Blueprint Written In Kotlin
Stars: ✭ 50 (+108.33%)
Mutual labels:  android-architecture, mvvm-architecture, mvvm-android
android-kick-start-modular
Android Kick Start Project Template Framework FrogoBox || Admob, MVVM Archictecture || Clean Architecture Modularization
Stars: ✭ 16 (-33.33%)
Mutual labels:  android-architecture, mvvm-architecture, mvvm-android
ctci-go
Cracking the Coding Interview in Go
Stars: ✭ 31 (+29.17%)
Mutual labels:  interview-questions, interview-preparation
Awesome-Software-Engineering-Interview
No description or website provided.
Stars: ✭ 409 (+1604.17%)
Mutual labels:  interview-questions, interview-preparation
Einsen
🎯 Einsen is a prioritization app that uses Eisenhower matrix technique as workflow to prioritize a list of tasks & built to Demonstrate use of Jetpack Compose with Modern Android Architecture Components & MVVM Architecture.
Stars: ✭ 821 (+3320.83%)
Mutual labels:  android-architecture, mvvm-android
CodingInterview
Leetcode解题、剑指offer第二版💪💪💪⛷😀
Stars: ✭ 28 (+16.67%)
Mutual labels:  interview-questions, interview-preparation
counter-interview.dev
a collaborative collection of interview questions collected from both sides of the game: Interviewer(s) and Interviewee.
Stars: ✭ 102 (+325%)
Mutual labels:  interview-questions, interview-preparation
MVVM-Koin-Repository-Pattern
Experimenting with MVVM, Koin and Repository pattern in a simple TODO app.
Stars: ✭ 29 (+20.83%)
Mutual labels:  mvvm-architecture, mvvm-android
HACKTOBERFEST-2020-flutter-interview-questions
Flutter interview questions with answers
Stars: ✭ 44 (+83.33%)
Mutual labels:  interview-questions, interview-preparation
Chat-App-Android
Chat app based on the MVVM architecture using Kotlin, ViewModel, LiveData, DataBinding and more.
Stars: ✭ 70 (+191.67%)
Mutual labels:  mvvm-architecture, mvvm-android
Leetcode-solutions
Leetcode Grinder.
Stars: ✭ 14 (-41.67%)
Mutual labels:  interview-questions, interview-preparation
KTAndroidArchitecture
A Kotlin android architecture with Google Architecture Components
Stars: ✭ 33 (+37.5%)
Mutual labels:  android-architecture, mvvm-architecture
Android-Kotlin-MVVM-Template
[In progress...] Chat APP | MVVM + Clean Architecture | Kotlin, LiveData, Koin, Databinding, Navigation Fragments, Rx, Room, Crashlytics, Circle CI config, commons classes for UI.
Stars: ✭ 314 (+1208.33%)
Mutual labels:  mvvm-architecture, mvvm-android
android-mvvm-dagger-2-rxjava-example
Sample Android Application - MVVM, Dagger 2, RxJava, Retrofit
Stars: ✭ 114 (+375%)
Mutual labels:  android-architecture, mvvm-architecture
Interview materials
A curated list of all essential job interview preparation materials.
Stars: ✭ 27 (+12.5%)
Mutual labels:  interview-questions, interview-preparation
MVI-Clean-Architecture
MVI + Clean Architecture + Best Practices | Example of Clean Architecture of Android app using MVI design pattern with Jetpack and popular libraries
Stars: ✭ 50 (+108.33%)
Mutual labels:  mvvm-architecture, mvvm-android
javascript-interview-questions
A collection of JavaScript modern interview questions for beginners to experts
Stars: ✭ 290 (+1108.33%)
Mutual labels:  interview-questions, interview-preparation
Competitive-Coding-and-Interview-Problems
This repo contains some problem solutions from different popular coding platforms like Code Chef, Leet Code, Hacker Blocks,etc.
Stars: ✭ 54 (+125%)
Mutual labels:  interview-questions, interview-preparation

Android interview questions that I've faced so far or I think is important

I'm creating this repository after getting rejected from ShareChat

Android Components

Explain briefly all the Android application components

App components are the essential building blocks of an Android app. Each component is an entry point through which the system or a user can enter your app. There are four different types of app components :

  • Activities - An activity is the entry point for interacting with the user. It represents a single screen with a user interface.
  • Services - A service is a general-purpose entry point for keeping an app running in the background for all kinds of reasons. It is a component that runs in the background to perform long-running operations or to perform work for remote processes.
  • Broadcast receivers - A broadcast receiver is a component that enables the system to deliver events to the app outside of a regular user flow, allowing the app to respond to system-wide broadcast announcements.
  • Content providers - A content provider manages a shared set of app data that you can store in the file system, in a SQLite database, on the web, or on any other persistent storage location that your app can access.

What is an Activity?

An activity provides the window in which the app draws its UI. This window typically fills the screen, but may be smaller than the screen and float on top of other windows. Generally, one activity implements one screen in an app. For instance, one of an app’s activities may implement a Preferences screen, while another activity implements a Select Photo screen.


Activity Lifecycle

Activity Lifecycle (in execution order) -

Method Called When
onCreate() Activity is first created.
onStart() Activity is becoming visible to the user.
onResume() Activity will start interacting with the user.
onPause() Activity is not interactable to the user.
onStop() Activity is no longer visible to the user.
onRestart() After activity is stopped, prior to start.
onDestroy() Before activity is destroyed.

*Note - The onCreate() and onDestroy() methods are called only once throughout the activity lifecycle.

Uses case of activity lifecycle with execution order

When activity is opened:
onCreate()

onStart()

onResume()
When moved to another activity:

Here A == first activity and B == second activity

onPause() - (A)

onCreate() - (B)

onStart() - (B)

onResume() - (B)

onStop() - (A)
When another activity is closed and moving back to first activity:
onPause() - (B)

onRestart() - (A)

onStart() - (A)

onResume() - (A)

onStop() - (B)

onDestroy() - (B)

onStart vs onResume

onStart() -> called when the activity becomes visible, but might not be in the foreground (e.g. an AlertFragment is on top or any other possible use case).

onResume() -> called when the activity is in the foreground, or the user can interact with the Activity.

onPause vs onStop

onPause() -> If you can still see any part of it (Activity coming to foreground either doesn't occupy the whole screen, or it is somewhat transparent).

onStop() -> If you cannot see any part of it

A dialog, for example, may not cover the entire previous Activity, and this would be a time for onPause() to be called

5 Anti patterns in android

  • Using base classes: Causes the tight coupling
  • Putting all dependencies in AppModule: Hard to read and during testing, we can't get the specific module
  • Using one activity per screen: Activity is heavy as it uses intent to open which internally talks to the android system and the fragment is similar to displaying a layout.
  • Hardcoding dispatchers: It forces the coroutine to use the particular dispatcher whereas in testing we need to pass the test dispatcher.
  • Using GlobalScope: Its keeps running during the application process and doesn't care about the lifecycle of the component which causes memory leak or dead object exception.

Thanks to Philipp Lackner for making a video on this - Link

6 Design pattern every android developer must know

  • Singleton
  • Factory
  • Builder
  • Facade
  • Dependency Injection
  • Adapter

Thanks to Philipp Lackner for making a video on this - Link

SOLID stands for:

S - Single-responsiblity Principle

O - Open-closed Principle

L - Liskov Substitution Principle

I - Interface Segregation Principle

D - Dependency Inversion Principle

Summary: We can say that the Single Responsibility Principle is about actors and high level architecture. The Open/Closed Principle is about class design and feature extensions. The Liskov Substitution Principle is about subtyping and inheritance. The Interface Segregation Principle (ISP) is about business logic to clients communication. And the Dependency Inversion Principale (DIP) is about leads or helps us respect all the other principles.

Thanks to Abderrazak Laanaya for writing a article on this - Link

General Questions

  • Tell me about Jetpack Libraries
  • Why shoud we use an app architecture and what are the best practices? read
  • What are Services, Broadcast receivers and Content providers? read
  • Tell me about the Manifest file, what is it's role? read
  • Difference between const and val? - val variable is initialized at runtime and const at compile time. Read more here
  • Diffrence between sp and dp - sp is same as dp, just android resizes it based on font size set by user.
  • What are diffrent Launch modes in android? read
  • What are implicit and explicit intents? read
  • What makes kotlin the best language for native development? read
  • Explain the internal working of a RecyclerView. read
  • On which thread would you update the UI components?- Main thread.
  • What are companion objects? read
  • Fragment lifecycle read
  • What are the diffrences between MVVM, MVC and MVP? read
  • How would you implement DI in your preferred architechure.
  • How is Interface useful in your architechure.
  • How to interact with other apps? read
  • How to use vibration in our app? read
  • Tell me about Dependency Injection
  • What is NDK and why is it used?read
  • What is the diffrence between .apk and .aab? read
  • What is databinding? read
  • What is a multi-modular app? read
  • What is KAPT? read
  • What is Diamond problem in Java? read

What is expected that you know

  • Basics of oops classes, inheritance, encapsulation, polymorphism and all of that stuff
  • Basic Data sturctures knowledge and problem solving skills
  • Basics of Database (eg SQL)
  • Basic Operating System knowledge (eg. Threads, cpu scheduling)
  • Basic Computer Science curriculum knowledge
  • Design patterns
  • Standard library functions of Java/Kotlin
  • Major Views and how to load data in them
  • Internal Working of Activities, Tasks & Stacks
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].