# Android Configuration

### Open Image Asset from Android Studio <a href="#icons" id="icons"></a>

1. Open **`FlyWeb_Flutter/android`** folder with Android Studio
2. Right-click the **res** folder and select **New** > **Image Asset**.

![Open Image Asset](https://3319500722-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McTnNLRtNdragDlAvxs%2F-MhIJHjix2Itg93EefPG%2F-MhIMYdnEg6sSsyvODfq%2FImage%20Asset.png?alt=media\&token=7ea9bae4-b57e-4936-8838-829d24cc7bda)

### Change icon application <a href="#icons" id="icons"></a>

![Change launcher icon application](https://3319500722-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McTnNLRtNdragDlAvxs%2F-MhIJHjix2Itg93EefPG%2F-MhIQCzIYFWU_pac9P5H%2Fnotification%20icons.png?alt=media\&token=a8932793-c214-4498-b0be-64d17bd3324d)

1. In the **Icon Type** field, select **Launcher Icons (Adaptive & Legacy)**.
2. In the **Foreground Layer** tab, select an **Asset Type**, and then specify the asset in the field underneath:
   * Select **Image** to specify the path for an image file.
   * Select **Clip Art** to specify an image from the [material design icon set](https://design.google.com/icons).
   * Select **Text** to specify a text string and select a font.
3. In the **Background Layer** tab, select an **Asset Type**, and then specify the asset in the field underneath. You can either select a color or specify an image to use as the background layer.
4. In the **Legacy** tab, review the default settings and confirm you want to generate legacy, round, and Google Play Store icons.
5. Click **Next**.
6. Click **Finish**.&#x20;

Image Asset Studio adds the images to the **mipmap** folders for the different densities.

### Change notification icon <a href="#icons" id="icons"></a>

![Change Notification Icon ](https://3319500722-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McTnNLRtNdragDlAvxs%2F-MhIJHjix2Itg93EefPG%2F-MhIPg1sN5trJgJXTHNj%2Ficon%20notification.png?alt=media\&token=faad0d9a-efef-421a-9b68-6c028fd1240c)

1. Open **`FlyWeb_Flutter/android`** folder with Android Studio
2. Right-click the **res** folder and select **New** > **Image Asset**.
3. In the **Icon Type** field, select **Notification Icons**.
4. Change name notification to **`ic_stat_onesignal_default`**
5. Select an **Asset Type**, and then specify the asset in the field underneath:

   * In the **Clip Art** field, click the button.

     In the **Select Icon** dialog, select a [material icon](https://design.google.com/icons) and then click **OK**.
   * In the **Path** field, specify the path and file name of the image. Click **...** to use a dialog.
   * In the **Text** field, type a text string and select a font.

   The icon appears in the **Source Asset** area on the right side, and in the preview area at the bottom of the wizard.
6. Click **Next**.
7. Click **Finish**.

Image Asset Studio adds the images in the **drawable** folders for the different densities and versions.

### Change Application Name

1. Open **`FlyWeb_Flutter/android/app/src/main/res/values/strings.xml`** and change the **`Fly Web`** with **`your name`**&#x20;

```
<resources>
    <string name="app_name"><REPLACE WITH YOUR NAME></string>
</resources>
```

### Change Package Name

1. Open **`FlyWeb_Flutter/android/app/build.gradle`** and change the package name&#x20;

   ```
   ...
   defaultConfig {
           applicationId "<REPLACE WITH YOUR PACKAGE NAME>"
          ...
   }
   ...
   ```
2. Open **`/android/app/src/main/AndroidManifest.xml`** and specify your **PACKAGE NAME**

```
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="<YOUR PACKAGE NAME>">
...
```

1. Ope&#x6E;**`FlyWeb_Flutter/android/app/src/main/kotlin/<Your Package name folders>/MainActivity.kt`** and change the package name
2. Copy the generated **`google-service.json`** file in **`FlyWeb_Flutter/android/app/`** folder, you can see this video tutorial, please [refer to this](https://positifmobile.gitbook.io/flyweb/config/firebase-setup).

### **Remove The Permissions from Android Manifest XML file**

Then in your **`android/app/src/main/AndroidManifest.xml`**:

And then you can remove all the permissions fro **`location`** :

![](https://3319500722-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McTnNLRtNdragDlAvxs%2F-MgZrytGUe8nOWHGVQyU%2F-MgZumzOUd7z3ELmfBte%2Fdelete%20permissions.png?alt=media\&token=294616d2-4b42-422c-934a-a3c572a83ae2)

### 1. Method :  Signing Application ( Android Studio ) <a href="#app-signing" id="app-signing"></a>

![](https://3319500722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McTnNLRtNdragDlAvxs%2Fuploads%2F7Fw6BhrwR0SCVja5k63Z%2FGroup%205023.png?alt=media\&token=f411f79e-4edb-4f9d-8402-2f7abd8467bb)

![](https://3319500722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McTnNLRtNdragDlAvxs%2Fuploads%2FtZnoU1VdTcHjS2DPlpnT%2FGroup%205022.png?alt=media\&token=5bc3cb79-3315-43a9-81dd-61ca5ef2f173)

![](https://3319500722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McTnNLRtNdragDlAvxs%2Fuploads%2Fui6d8hNQiOyRTXejpvkL%2FGroup%205021.png?alt=media\&token=f507f760-8cd8-4b02-b2fd-100326b4dbb8)

### 2. Method : Signing Application ( CMD ) <a href="#app-signing" id="app-signing"></a>

1- To upload your application on Google Play you need to sign it before uploading&#x20;

Generate a signing key by running the following command:

{% hint style="info" %}
**NB:**\
Open terminal in folder **FlyWeb\_Flutter**

Don't forget to remove old **key.jks** file from **android/app/key.jks**
{% endhint %}

```
keytool -genkey -v -keystore android/app/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
```

2- Open **`FlyWeb_Flutter/android/gradle.properties`** and edit the following attributes after that re-build your application:

```
storePassword_=<Your Key Password>
keyPassword_=<Your Key Password>
keyAlias_=key
storeFile_=key.jks
```

### Update Key with my Old-Key <a href="#app-signing" id="app-signing"></a>

If you have an **`old app`**,Just change this like your **`old version`** :

1- Change this file **`key.jks`**

![Change file key.jks](https://3319500722-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McTnNLRtNdragDlAvxs%2F-Mg9mLLp3OqAgOw92tt6%2F-Mg9yPYrpqXV_7YUEXHS%2F%C3%A9l%C3%A9ment-1.png?alt=media\&token=40757bdb-a9c5-4601-917b-fac9ed8d847a)

2- Change this with your **`old information key`**&#x20;

```
storePassword_=<Your Key Password>
keyPassword_=<Your Key Password>
keyAlias_=key
storeFile_=key.jks
```

![](https://3319500722-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McTnNLRtNdragDlAvxs%2F-Mg9mLLp3OqAgOw92tt6%2F-Mg9yd3cSzc5iVVNrGqR%2F1.png?alt=media\&token=c8f80782-5173-45fc-aa73-857547841124)

### Changing App Name and Version Number&#x20;

Changing  **`versionName`** and **`versionCode`** in **`pubspec.yaml`** file.

![](https://3319500722-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McTnNLRtNdragDlAvxs%2F-MhIGFJp3YNRSgG06vPp%2F-MhIIbiADyeQf0U7ZtM_%2Fchange%20version.png?alt=media\&token=44109f24-8257-4e73-a4f0-9d7d6b52b516)

Whenever we release the app for the first time it by default will take up version 1.0.0 and if we want to change it in next release we can simply type in the `build name(version name)` and `build number(version code)` of our choice.

![](https://3319500722-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McTnNLRtNdragDlAvxs%2F-MhIGFJp3YNRSgG06vPp%2F-MhIHowPCCwyVUfLxAvt%2F1_oGQluXX6lE8r036vq1x3zQ.png?alt=media\&token=a0d66370-40d1-4197-8392-f89e3d4310bb)

### Generate APK&#x20;

Open the console, go to your project folder and execute the following command to build your application

```
flutter build apk --release
```

You should get the APK file in the  **`FlyWeb_Flutter/build/app/output/apk`** folder.

### Generate App Bundle

Open the console, go to your project folder and execute the following command to build your application

```
flutter build appbundle
```

The release bundle for your app is created at **`FlyWeb_Flutter/build/app/outputs/bundle/release/app.aab`**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://positifmobile.gitbook.io/flyweb/installation-mobile-app/android-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
