How to Find Your Android App’s Package Name and Class Name for Meta (Facebook) Integration

If you’re setting up your app on Meta Business Suite or the Facebook for Developers portal and it asks for your Package Name and Class Name, you may wonder: “Where exactly do I find these values?”

What is a Package Name?

The package name is a unique identifier for your Android app. It follows the reverse-domain naming pattern (e.g., com.example.myapp) and is used across Play Store, Firebase, and Meta integrations.

Meta uses it to:


Where to Find the Package Name

There are two main places you can find it:

1. In AndroidManifest.xml

Navigate to:

android/app/src/main/AndroidManifest.xml

At the very top, you’ll see:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.trip-service.online">

The package value here is your package name.


2. In build.gradle (app-level)

Open this file:

android/app/build.gradle

Look for the applicationId inside defaultConfig:

android {
    defaultConfig {
        applicationId "com.trip-service.online"
    }
}

The applicationId is used when building and publishing your app. It is also what Meta (and Google Play) uses to identify your app.

If applicationId is defined, use that as the official package name.


What is a Class Name?

The class name that Meta asks for is usually your app’s main activity class — the entry point when your app is launched.

It helps Meta:


Where to Find the Class Name

In your project, open:

android/app/src/main/AndroidManifest.xml

Find the activity with android.intent.action.MAIN:

<activity
    android:name=".MainActivity"
    android:exported="true"
    android:launchMode="singleTask">
    
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

</activity>

Here, android:name=“.MainActivity” means it is the Main Activity and the dot (.) means it’s relative to the package name.


How to Build the Full Class Name

Let’s say:

Then your full class name is:

com.trip-service.online.MainActivity

If the android:name was already fully qualified like com.trip-service.online.ui.HomeActivity, then that would be the class name directly.


Example from a Real Project

Here’s a snippet from a working AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.trip-service.online">

    <application ...>

        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:windowSoftInputMode="adjustResize">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="https" android:host="www.trip-service.online" />
                <data android:pathPrefix="/l/" />
                <data android:pathPrefix="/a/" />
            </intent-filter>
        </activity>

    </application>
</manifest>

From this example:


When Do You Need This for Meta?

You need to provide package name and class name when:


Summary

What Where to Find Example
Package Name build.gradle or AndroidManifest.xml com.trip-service.online
Class Name AndroidManifest.xml under com.trip-service.online.MainActivity

Final Tips

grep "package=" android/app/src/main/AndroidManifest.xml

Need Help?

If you’re confused or Meta is showing an error about your class/package name, double-check:

Feel free to drop your error or manifest snippet in comment — I’d be happy to help debug.