Android Studio Shortcuts (Boost Productivity)

Using shortcuts can speed up development significantly. Here are essential ones:

Navigation & Editing

  • Ctrl + N (Windows/Linux) / Cmd + O (Mac) – Open Class

  • Ctrl + Shift + N / Cmd + Shift + O – Open File

  • Ctrl + Alt + L / Cmd + Option + L – Format Code

  • Shift + Shift – Search Everywhere

Code Assistance & Debugging

  • Ctrl + P / Cmd + P – Parameter Info

  • Ctrl + Q / Cmd + J – Quick Documentation

  • F8 – Step Over (Debugger)

  • F7 – Step Into (Debugger)

Build & Run

  • Shift + F10 – Run App

  • Shift + F9 – Debug App

  • Ctrl + F9 / Cmd + F9 – Build Project

Firebase for Backend (Key Features & Setup)

Firebase provides a powerful backend solution without needing full-stack infrastructure.

🚀 Key Features for Android Apps

  • Firestore Database – NoSQL cloud database for scalable apps.

  • Authentication – Easy setup for login via email, Google, or social accounts.

  • Cloud Functions – Run server-side logic without managing servers.

  • Push Notifications – Firebase Cloud Messaging (FCM) for real-time alerts.

How to Set Up Firebase in Android Studio

  1. Go to Firebase Console and create a project.

  2. Add Android app (com.example.myapp) and download google-services.json.

  3. Add Firebase SDK dependencies to build.gradle.

  4. Initialize Firebase in your app’s code:

    java
    FirebaseApp.initializeApp(this);
    

ADB Debugging Tricks (Advanced Device Debugging)

ADB (Android Debug Bridge) lets you interact with Android devices directly.

Essential ADB Commands

  • adb devices – List connected devices.

  • adb install myapp.apk – Install an APK.

  • adb uninstall com.example.app – Remove an app.

  • adb logcat -s "TAG" – Filter logs for debugging.

Advanced Debugging

  • Screen Recording:

    bash
    adb shell screenrecord /sdcard/video.mp4
    
  • Capture Bug Report:

    bash
    adb bugreport bugreport.zip
    
  • Reset App Data:

    bash
    adb shell pm clear com.example.app