hunk.code_window:     )
     }
     fun name(name: String) {
       this.name = name
     }
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit:   /**
      * Sets the name of the module that is exported to the JavaScript world.
      */
  
hunk.file_path: packages/expo-modules-core/android/src/main/java/expo/modules/kotlin/modules/ModuleDefinitionBuilder.kt
hunk.type: add
file: ---
  title: Application
  sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-42/packages/expo-application'
  ---
  
  import APISection from '~/components/plugins/APISection';
  import InstallSection from '~/components/plugins/InstallSection';
  import PlatformsSection from '~/components/plugins/PlatformsSection';
  
  **`expo-application`** provides useful information about the native application, itself, such as the ID, app name, and build version.
  
  <PlatformsSection android emulator ios simulator web />
  
  ## Installation
  
  <InstallSection packageName="expo-application" />
  
  ## API
  
  ```js
  import * as Application from 'expo-application';
  ```
  
  <APISection packageName="expo-application" apiName="Application" />
  
  ## Error Codes
  
  | Code                                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                    |
  | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | ERR_APPLICATION_PACKAGE_NAME_NOT_FOUND                | Error code thrown by `getInstallationTimeAsync` and `getLastUpdateTimeAsync`. This may be thrown if the package information or package name could not be retrieved.                                                                                                                                                                                                                                            |
  | ERR_APPLICATION_INSTALL_REFERRER_UNAVAILABLE          | The current Play Store app doesn't provide the installation referrer API, or the Play Store may not be installed. This error code may come up when testing on an AVD that doesn't come with the Play Store pre-installed, such as the Google Pixel 3 and Nexus 6.                                                                                                                                              |
  | ERR_APPLICATION_INSTALL_REFERRER_CONNECTION           | A connection could not be established to the Google Play Store.                                                                                                                                                                                                                                                                                                                                                |
  | ERR_APPLICATION_INSTALL_REFERRER_REMOTE_EXCEPTION     | A `RemoteException` was thrown after a connection was established to the Play Store. This may happen if the process hosting the remote object is no longer available, which usually means the process crashed. See https://stackoverflow.com/questions/3156389/android-remoteexceptions-and-services.                                                                                                          |
  | ERR_APPLICATION_INSTALL_REFERRER                      | General default case error code for the `getInstallReferrerAsync` method. This error code will be thrown if an exception occurred when getting the install referrer, but the exception was none of the more precise errors. The [`responseCode`](https://developer.android.com/reference/com/android/installreferrer/api/InstallReferrerClient.InstallReferrerResponse.html) is provided along with the error. |
  | ERR_APPLICATION_INSTALL_REFERRER_SERVICE_DISCONNECTED | Connection to the install referrer service was lost. This error is thrown when an attempt was made to connect and set up the install referrer service, but the connection was lost. See the [Android documentation](https://developer.android.com/reference/com/android/installreferrer/api/InstallReferrerStateListener) for more information.                                                                |
  