40

What is meant by bundle ID in android, What is its usage, And can two android apps have same bundle ID? if YES then why? and if NO then why

Muhammad Irfan
  • 735
  • 1
  • 11
  • 17

2 Answers2

54

A bundle ID otherwise known as a package in Android is the unique identifier for all Android apps. It needs to be unique as when you upload it to Google Play it identifies and publishes your app using the package name as the unique app identification.

Really it is the only thing which is necessary to identify your app, and generally it has 3 parts:

com.example.testapp

Where example is generally the company/publishers name, and testapp is the appname.

You will not be able to upload an APK to the store which has the same package as another app already in the store.

Should you ever need to change the package name in Eclipse, do the following:

Right click project > Android Tools > Rename Application Package...

Joss Stuart
  • 1,856
  • 1
  • 17
  • 19
  • 1
    Just a point for people trying to rename the application package you will probably have to copy your class files (inside the src directory) over into the new package as well. For some reason eclipse doesn't do this for you. – tustvold Jul 26 '13 at 14:40
7

BundleID is a Unique Identifier for Identifying your app on Google Play Store. You can Note that for each apps on Google Play something like this:

https://play.google.com/store/apps/details?id = com.yourdomain.appname

You cannot assign the same BundleId for more than one App. This is because the Google Play uses your BundleID as Unique Identifier for your app.

So, you can configure your BundleID in Android Studio by editing your applicationId property in app level gradle as shown below:

android {
    compileSdkVersion 27
    defaultConfig {
        //Edit the applicationId for changing your BundeID.
        applicationId "com.yourdomainname.yourappname"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
BharathRao
  • 1,846
  • 1
  • 18
  • 28