Android

Android Performance and Monitoring

Android performance and monitoring: profiling, memory, ANR, optimization, and diagnostic tools

13 mülakat soruları·
Senior
1

What is Android Profiler and what are its 4 modules?

Cevap

Android Profiler is a tool integrated into Android Studio that analyzes your app's real-time performance. It helps detect CPU, memory, network, and battery issues to optimize your app. Its 4 modules are: CPU Profiler (CPU usage and call traces), Memory Profiler (heap and allocations tracking), Network Profiler (network requests and bandwidth usage), and Energy Profiler (battery consumption and wake locks).

2

How does LeakCanary detect and report memory leaks in Android?

Cevap

LeakCanary is a library that automatically monitors objects expected to be garbage-collected (like a destroyed Activity or Fragment). If an object remains in memory when it shouldn't, LeakCanary detects the leak, analyzes the retention chain, and displays a notification with likely causes and the stack trace.

3

What is StrictMode in Android and what is it used for?

Cevap

StrictMode is a detection tool used to identify bad practices that might block the main thread, such as disk or network operations on the UI thread. It's usually enabled in development with StrictMode.setThreadPolicy() and StrictMode.setVmPolicy(), often wrapped in BuildConfig.DEBUG. When a violation is detected, it can log warnings, throw exceptions, or show alerts to help fix the issue before production.

4

What is the Layout Inspector in Android Studio and what is it used for?

5

What is Systrace in Android and what is it used for?

+10 mülakat soruları

Bir sonraki mülakatın için Android'de uzmanlaş

Tüm sorulara, flashcards'a, teknik testlere, code review alıştırmalarına ve mülakat simülatörlerine eriş.

Ücretsiz başla