Mobile Developer Interview Questions (App Lifecycle & Native vs Hybrid)

11 min read 2,062 words

What Mobile Interviews Actually Test

Mobile interviews test platform thinking over syntax memorization. Companies probe how you manage app lifecycle states without breaking user experience, choose between native and hybrid approaches based on project constraints, handle offline scenarios gracefully, optimize battery consumption, and build apps that work across device fragmentation. This article covers mobile development fundamentals tested in mobile developer interview questions: lifecycle state transitions, native versus hybrid trade-offs, offline data strategies, battery optimization patterns, and cross-platform decisions.

You’ll learn how mobile apps transition through lifecycle states, when native development justifies the cost versus hybrid alternatives, implement offline functionality that syncs properly, optimize for battery life without sacrificing features, and navigate device fragmentation challenges. Understanding technical interview fundamentals helps, but this focuses on mobile-specific thinking applicable across iOS and Android platforms.

App Lifecycle Management

Understanding app lifecycle management means knowing how apps transition between states and handle interruptions properly.

Lifecycle States and Transitions

Q: Explain the mobile app lifecycle and why it matters.

Apps transition through states: not running, background, foreground. iOS lifecycle (UIViewController): loadView, viewDidLoad, viewWillAppear, viewDidAppear, viewWillDisappear, viewDidDisappear. Android Activity lifecycle: onCreate, onStart, onResume, onPause, onStop, onDestroy. Operating systems manage memory by moving apps between states. Apps must save state before backgrounding (user switches apps). Restore state when returning to foreground. Handle system interruptions (phone calls, notifications) gracefully.

Q: How do you handle app state when it moves to background?

Save critical data immediately in onPause (Android) or applicationWillResignActive (iOS). System can kill background apps anytime without warning. Store UI state (scroll position, form inputs, selected tab). Persist user data to storage. Pause animations, network requests, timers. Release heavy resources (camera, location services). When returning to foreground: restore saved state, resume paused operations, refresh data if stale.

Q: What’s the difference between Android’s onPause and onStop?

onPause called when activity loses focus but remains partially visible (dialog appears over it). onStop called when activity completely hidden from view. Save critical data in onPause because onStop might not execute if system kills process. Release resources consuming battery (GPS, sensors) in onPause. Heavy cleanup operations can wait for onStop. Understanding this distinction prevents data loss during unexpected termination.

Q: How do you prevent memory leaks in mobile apps?

Android: avoid holding Activity references in background tasks. Use weak references for listeners/callbacks. Release resources in onDestroy. Tools: LeakCanary detects leaks. iOS: understand reference cycles with closures. Use [weak self] or [unowned self] in closures. Automatic Reference Counting (ARC) manages memory but can’t break cycles. Instruments tool profiles memory. Both platforms: remove observers, cancel network requests, invalidate timers when views disappear.

Native vs Hybrid Development

Choosing between native vs hybrid development requires understanding trade-offs in performance, development speed, and platform access.

Development Approaches

Q: What’s the difference between native, hybrid, and cross-platform development?

Native: separate codebases for each platform. iOS uses Swift/Objective-C, Android uses Kotlin/Java. Full platform API access, best performance, native UI components. Cost: maintain two codebases, separate teams.

Hybrid: web technologies (HTML/CSS/JS) wrapped in native shell using Cordova/Ionic. Single codebase, web developers can build. Limited native feature access, slower performance. Cross-platform: frameworks like React Native, Flutter create native apps from single codebase. Better performance than hybrid, shared code with platform-specific customization.

Q: When would you choose native over cross-platform development?

Choose native for: performance-critical apps (games, complex animations), heavy platform API usage (AR, camera processing, hardware sensors), apps requiring latest platform features immediately, when budget supports separate teams.

Choose cross-platform for: business apps with standard UI, faster time to market, limited budget requiring shared codebase, when app doesn’t need cutting-edge platform features. React Native/Flutter handle most common scenarios. Native required when cross-platform frameworks can’t access needed APIs or performance isn’t acceptable.

Q: What are the main challenges of cross-platform development?

Platform differences: iOS and Android have different design guidelines (Material vs Human Interface). Bridging native code when framework doesn’t support needed features. Performance overhead from bridge layer (JavaScript to native in React Native). Debugging across platforms requires understanding both.

Dependency on framework updates for new OS features. Plugin ecosystem quality varies. Some platform-specific bugs require native code. Testing needs covering both platforms thoroughly. Build processes more complex (separate for each platform). Benefits still outweigh costs for many projects.

Q: How do you access platform-specific features in cross-platform apps?

Cross-platform frameworks provide plugin systems. React Native: native modules bridge JavaScript to native code. Flutter: platform channels communicate between Dart and native. Write platform-specific code for features not covered by framework. Community plugins often exist for common needs (camera, geolocation, payments). For custom needs: write native module, expose to cross-platform layer through bridge. Maintain native code alongside shared codebase.

Offline Storage and Battery Optimization

Mobile apps must handle intermittent connectivity and optimize mobile offline storage while minimizing battery drain.

Offline Data Strategies

Q: How do you implement offline functionality in mobile apps?

Local storage options: SQLite databases for structured data, key-value stores (SharedPreferences on Android, UserDefaults on iOS) for simple data, file system for documents/images. Cache API responses locally. Queue user actions when offline, sync when online. Show cached data immediately, update in background. Conflict resolution when local and server data differ. Optimistic UI updates assume success, rollback if sync fails.

Q: What’s your approach to data synchronization in mobile apps?

Background sync when network available. Timestamp-based syncing tracks last sync time, fetches changes since then. Delta syncing sends only changed data, not full datasets. Conflict resolution strategies: last-write-wins (simple but loses data), merge (complex but preserves changes), user resolution (show conflicts, let user choose). Queue operations when offline, retry with exponential backoff. Monitor network status, sync when wifi available for large transfers.

Q: How do you optimize mobile apps for battery life?

Reduce network calls: batch requests, cache aggressively, use compression. Limit GPS usage: use coarse location when precise not needed, stop location updates when not needed. Efficient background work: use WorkManager (Android) or Background Tasks (iOS) for scheduled operations. Avoid polling: use push notifications instead. Optimize animations: reduce frame rate, pause when backgrounded. Monitor battery usage with profiling tools. iOS: Instruments Energy Log. Android: Battery Historian.

Q: What database options exist for mobile apps and when to use each?

SQLite: relational database, complex queries, data relationships. Built into both platforms. Realm: object database, faster than SQLite for some operations, automatic syncing options. Core Data (iOS): object graph management, iCloud syncing. Room (Android): SQLite wrapper, compile-time query verification. Key-value stores for simple preferences. Choose based on data structure complexity, query needs, sync requirements. SQLite most common for general purpose.

Platform-Specific Challenges

Mobile developers handle device fragmentation and platform differences affecting app behavior.

Device Fragmentation

How do you handle device fragmentation in Android development?

Android runs on thousands of devices with different screen sizes, densities, OS versions. Responsive layouts using ConstraintLayout adapt to screens. Provide image assets for different densities (mdpi, hdpi, xhdpi, xxhdpi). Support API level ranges: minSdkVersion (minimum supported), targetSdkVersion (tested version), compileSdkVersion (build tools).

Test on physical devices representing popular configurations. Use Android Studio emulators for various screen sizes. Handle OS version differences: check API level before using newer features, provide fallbacks. Libraries like AppCompat backport features. Device testing services (Firebase Test Lab) run on real devices. Fragmentation remains Android’s biggest challenge.

What are key differences between iOS and Android development approaches?

iOS: single manufacturer (Apple), limited device types, faster OS adoption (80%+ on latest within months). Design follows Human Interface Guidelines. Swift is primary language. Xcode is mandatory IDE. App Store review process stricter, 1-3 days approval.

Android: multiple manufacturers, massive device fragmentation, slow OS adoption (latest version <20% after year). Material Design guidelines. Kotlin is preferred language. Flexible IDE choices (Android Studio recommended). Play Store review automated, hours to publish. iOS easier device testing, Android requires handling more variations. Development approaches reflect platform philosophies: iOS controlled ecosystem, Android open flexibility.

How do you optimize app size for mobile platforms?

Remove unused resources: code shrinking (ProGuard/R8 on Android), resource shrinking removes unused images/layouts. Use vector graphics instead of multiple density PNGs. Compress images with tools like TinyPNG. Split APKs/App Bundles: generate platform-specific builds (arm64, x86), include only needed resources per device.

Lazy load features: download on-demand instead of bundling. Minimize dependencies: each library adds size. Use lighter alternatives when possible. Android App Bundle (AAB) format optimizes delivery. iOS App Thinning delivers device-specific builds. Monitor size with each build. Large apps have lower install rates, especially in markets with limited bandwidth.

Mobile Platform Quiz

20 Practice Questions

1. When should you save app state in Android?

  • Only in onDestroy
  • In onPause
  • In onCreate
  • Automatic by system

2. What’s the main advantage of native over hybrid mobile apps?

  • Easier development
  • Better performance and full platform API access
  • Single codebase
  • Faster time to market

3. Which lifecycle method is called when Android Activity becomes visible?

  • onCreate
  • onStart
  • onResume
  • onPause

4. What causes memory leaks in iOS apps?

  • Using too much memory
  • Reference cycles with closures
  • Creating many objects
  • Large images

5. Which database is built into both iOS and Android?

  • SQLite
  • Realm
  • MongoDB
  • PostgreSQL

6. In React Native, how does JavaScript communicate with native code?

  • Direct function calls
  • Through bridge layer
  • HTTP requests
  • Shared memory

7. What’s the best way to save battery when using GPS?

  • Always use high accuracy
  • Use coarse location when precise not needed, stop when not needed
  • Never use GPS
  • Poll location every second

8. Which statement about hybrid apps is TRUE?

  • Faster than native apps
  • Use web technologies wrapped in native shell
  • Full platform API access
  • Require separate codebases per platform

9. What’s the purpose of SharedPreferences (Android) or UserDefaults (iOS)?

  • Store large files
  • Store simple key-value pairs
  • Complex relational data
  • Network caching

10. In mobile offline sync, what does “optimistic UI” mean?

  • Always show loading
  • Update UI assuming success, rollback if fails
  • Never cache data
  • Require network for all operations

11. Which Android tool detects memory leaks?

  • Gradle
  • ProGuard
  • LeakCanary
  • WorkManager

12. What’s the main challenge of Android device fragmentation?

  • All devices identical
  • Different screen sizes, OS versions, hardware
  • Single manufacturer
  • Fast OS adoption

13. Which is NOT a cross-platform mobile framework?

  • React Native
  • Flutter
  • Xcode
  • Xamarin

14. When app moves to background, what should you do?

  • Continue all operations normally
  • Save state, pause animations, release resources
  • Delete all data
  • Nothing, system handles it

15. What’s delta syncing in mobile apps?

  • Sync everything every time
  • Send only changed data, not full datasets
  • Never sync automatically
  • Sync only on wifi

16. Which iOS tool profiles memory and performance?

  • Swift
  • Instruments
  • CocoaPods
  • TestFlight

17. What happens in Android’s onCreate method?

  • Activity is created, views initialized
  • Activity becomes visible
  • Activity is destroyed
  • Activity goes to background

18. Why use vector graphics in mobile apps?

  • Larger file size
  • Scale to any screen density without multiple assets
  • Better for photos
  • Faster rendering

19. What does ARC stand for in iOS development?

  • App Resource Center
  • Automatic Reference Counting
  • Advanced Render Control
  • Application Runtime Cache

20. Which approach reduces app install size?

  • Include all libraries
  • Bundle resources for all densities
  • App Bundle/Thinning delivers device-specific builds
  • Disable code shrinking

❓ FAQ

🎯 Should I learn iOS, Android, or both?

Master one platform deeply first. Concepts transfer between platforms. Cross-platform frameworks (React Native, Flutter) let you build for both, but understanding native development helps debug framework limitations.

💼 Do mobile interviews require live coding?

Expect live coding similar to backend interviews plus mobile-specific questions about lifecycle, platform APIs, offline handling. Some companies provide take-home projects building actual mobile apps.

⏰ How important is understanding app lifecycle?

Critical. Apps that don’t handle lifecycle properly lose user data, drain battery, crash. Almost every mobile interview asks lifecycle questions. Practice explaining state transitions clearly.

📋 Should I focus on native or cross-platform development?

Depends on target companies. Startups often use cross-platform for speed. Large companies with dedicated teams use native. Understanding trade-offs matters more than memorizing framework APIs.

✨ What if I haven’t published apps to stores?

Build personal projects demonstrating mobile concepts: offline functionality, background sync, platform API usage. Experience with actual devices and App Store/Play Store submission processes helps but isn’t always required for junior roles.

Final Thoughts

Modern mobile developer interview questions test platform-specific thinking over framework memorization. Master app lifecycle state management preventing data loss, native versus hybrid trade-offs based on project needs, offline functionality with proper synchronization, battery optimization without sacrificing features, and strategies handling device fragmentation. Success requires building actual mobile apps where you handle lifecycle transitions, implement offline modes, optimize performance, and deploy to real devices.

⚠️ Disclaimer: The interview strategies, sample answers, and negotiation tips provided in this guide are for educational purposes only. Hiring decisions are subjective and vary by company and industry. While these strategies are based on professional HR standards, they do not guarantee a specific job offer or result.