pranav51286 Profile Banner
Pranav Kumar Profile
Pranav Kumar

@pranav51286

Followers
17
Following
579
Media
36
Statuses
144

Android development | Kotlin , Python| Machine learning , Deep learning | Natural language Processing |

Joined April 2021
Don't wanna be here? Send us removal request.
@pranav51286
Pranav Kumar
2 months
Kotlin flows offer a robust, coroutine based solution for handling asynchronous data streams. It's cold sequential, and cancellable ideal for managing reactive data in modern Android apps.
Tweet media one
0
0
2
@pranav51286
Pranav Kumar
3 months
My focus has been on clean code & modern design: separating UI, business logic, and system interactions.
0
0
3
@pranav51286
Pranav Kumar
3 months
Been working on a side project—a video streaming app that streams live video using ExoPlayer and even records streams with FFmpegKit. Built using Jetpack Compose & Hilt for dependency injection. It supports multiple protocols : http, rtsp, hls, webRtc,
1
0
4
@pranav51286
Pranav Kumar
3 months
What is App Architecture?.- It’s your app’s blueprint—guiding how you organize code, data, and UI. A good architecture:.- Scales easily.- Boosts team productivity.- Simplifies adding new features.
0
0
2
@pranav51286
Pranav Kumar
3 months
In unidirectional data flow, the UI update loop looks like this:.🔁 Event → State Update → UI Display.1️⃣ Event: UI triggers an event (e.g., button click).2️⃣ State Update: ViewModel updates the state.3️⃣ Display: New state flows down to the UI. Simple, clean, and predictable.
0
0
3
@pranav51286
Pranav Kumar
3 months
- Unidirectional data flow = state flows down, events . flow up. - It decouples UI (that shows state) from logic (that . stores/updates it). - Cleaner, testable, and more maintainable apps.
Tweet media one
1
0
4
@pranav51286
Pranav Kumar
3 months
In Jetpack compose to display items in a grid we can use the LazyVerticalGrid and LazyHorizontalGrid composables.
Tweet media one
0
0
3
@pranav51286
Pranav Kumar
3 months
- Enum class: Use to define a fixed set of contants.
Tweet media one
0
0
2
@pranav51286
Pranav Kumar
3 months
In Kotlin, classed can be categorized based on their usage and behavior. - Data Class : Used for holding data. Provides equals(), hashCode(), toString(), copy() etc, methods automatically.
Tweet media one
1
0
2
@pranav51286
Pranav Kumar
3 months
A class is a blueprint for creating objects. It defines the properties (data) and behaviors (functions or methods) that the objects will have, it allows us to create multiple instances that share the same properties and methods.
Tweet media one
1
0
4
@pranav51286
Pranav Kumar
4 months
Why is State Hoisting a Good Practice in Jetpack Compose?.- Increases Reusability: A stateless composable can be used in different scenarios without modification. - Simplifies State Management: Hoisting state makes it easier to share and synchronize across multiple composables.
0
0
4
@pranav51286
Pranav Kumar
4 months
State hoisting is a pattern where a composable function does not manage its own state but instead delegates state management to its caller.
1
0
4
@pranav51286
Pranav Kumar
4 months
When we define a stateless composable we move the state to its caller.
Tweet media one
1
0
4
@pranav51286
Pranav Kumar
4 months
A stateless composable doesn't have a state, meaning it doesn't hold, define or modify a new state. Whereas a stateful composable is one that has a state that can be defined or modified over time .
1
0
4
@pranav51286
Pranav Kumar
4 months
To preserve the state across recompositions, we wrap it with remember {}. This ensures that the state is not reset when the composable recomposes.
0
0
3
@pranav51286
Pranav Kumar
4 months
Jetpack compose provides us with State and MutableState types to make the state observable, or tracked by compose. We use mutableStateOf() function to create an observable MutableState.
1
0
3
@pranav51286
Pranav Kumar
4 months
State is an app is any value that can change over time. Compose apps call composable functions to transform data into UI. If the state change happens, compose re-executes the affected composable function to transform data into UI this is called recomposition .
Tweet media one
Tweet media two
2
0
5
@pranav51286
Pranav Kumar
4 months
Kotlin provides lambda expressions and anonymous functions, which are function literals. Function literals are functions that are not declared but are passed immediately as expressions.
Tweet media one
0
0
3
@pranav51286
Pranav Kumar
4 months
- Secondary constructor: A class can have multiple secondary constructors. The secondary constructor can initialize the class and has a body, which can contain initialization logic.
Tweet media one
0
0
2
@pranav51286
Pranav Kumar
4 months
There are two main types of constructors in Kotlin:.- Primary constructor: A class can have only on primary which is defined as part of the class header. A primary constructor doesn't have a body.
1
0
2