Skip to content

theminesec/ms-app-msa-opensource

Repository files navigation

Application Rebranding Guideline

1. Prepare Development Environment

1.1 Set compile environment to jdk17

Note: the source code project is built based on JDK17. Please kindly choose JDK17 to compile the project Go to File > Settings > Build, Execution, Deployment > Build Tools > Gradle

image

Select Gradle JDK
select Download JDK...
Select Version 17
Click Download
Click Apply and Ok

Click Sync Now after configuration.


1.2 Setup the maven credential

Note: You might want to set the credential in your machine's global gradle.properties instead of the project's gradle.properties to avoid accidentally committing it into git.

In your machine's global gradle properties:

# minesec client registry
GITHUB_USERNAME=minesec-product-support
GITHUB_TOKEN={token-value}

Replace the placeholder path with your actual keystore location:

MS_KS_FILE=../keystore/your_keystore.jks

MS_KS_STORE_TYPE=jks

MS_KS_STORE_PASS=your_store_password

MS_KS_KEY_ALIAS=your_key_alias

MS_KS_KEY_PASS=your_key_password

The token will be managed by our customer support team, if you want to request one please contact us

2. Update Application Information

Update the basic information of your application, such as the package name and version number.

2.1 Update package name and applicationId

Edit namespace and applicationId in app/build.gradle.kts file

// Example:
namespace = "com.minesec.b"
applicationId = "com.minesec.b"

Refactor the package name (highlighted in blue) to match your namespace and applicationId
image

app/google-services.json:
This json file is configured in the firebase (google) and download from google firebase console. You have to login to your firebase to configure your own application information(applicationId) and then generate the json file

2.2 Update application version

Note: MineSec will provide the customerId Edit app/google-services.json

//Example:
        // DO NOT CHANGE, re-cert require
        val majorVersion = 2
        // DO NOT CHANGE, re-cert require
        val minorVersion = 0
        // msa component lib version
        //val patchVersion: Int = 75
        val patchVersion: Int = libs.versions.mineSecMsaLibs.get().takeLast(3).takeLastWhile { it.isDigit() }.toInt()
        // license update, build config changes
        val buildVersion = 1
        // MineSec
        val customerId = 111 //changes were made

2.3 Replace license

Replace the license file in your application project with the appropriate one.

Note: The required LICENSE file will be provided by MineSec. Please contact us if you have not received it before you start rebranding the app.

License file is found in the assets folder.

image

In app/build.gradle.kts, modify the string to match the name of your license:

image

3. Branding & Visual Adjustment

3.1 Replace the logo

  • Full Logo: Displayed on the activation UI page.
  • Square Logo: Used in some loading indicators.
  • Recommended sizes:
    • Full Logo: 240 × 60
    • Square Logo: 60 × 60
  • Place these vector files in both the drawable and drawable-night folders in your application.

3.1 Change application logos

Convert your image from PNG to SVG before importing it into Android Studio. This allows you to resize the image without losing quality.
In Android Studio, click View > Tool Windows > Resource Manager
Click + > Vector Asset> click Local file(SVG,PSD) if you want to import images from your computer
Adjust the size and opacity to meet your requirements(maintain the original proportions to avoid distortion)
Copy the code and paste it in logo_full.xml or logo_square.xml ( found in app/src/main/res/drawable and app/src/main/res/drawable-night)

3.2 Change application launcher icon (icon displayed on homescreen)

In Android Studio, click View > Tool Windows > Resource Manager
Click + > Image Asset

Click on Foreground Layer tab
Look for path, click on Screenshot 2025-09-08 at 8 44 39 PM
Select your launcher icon that you save on your computer
Trim : Yes
Resize(optional): make launcher icon bigger or smaller by adjusting the percentage according to your preference

Click on Background Layer tab
Look for path Asset type
Choose an image (saved in your computer) or a color (select color code)
Usually, we will make the background color white (#FFFFFF)

Click Next
Click Finish

3.3 Update Color and theme

Go to app\src\main\res\values and app\src\main\res\values-night
Modify the colors.xml file with your own color scheme(change the color code (#??????)).

Note: If you are using color with alpha(transparency),note that Android Studio expects the ARGB format (#AARRGGBB)
For example : #0A6AC8 (70% transparency) is #B30A6AC8 in Android Studio

Button color: brand_primary
Button text color: brand_primary_foreground
Navigation drawer background: brand_secondary
Navigation drawer text color: brand_secondary_foreground

Go to settings on your phone to switch between light mode and dark mode

4. Change app name and localization

4.1 Change app name

Edit both strings.xml files in app/src/main/res/values/strings.xml and app/src/debug/res/values/strings.xml

<string name="app_name">your_app_name</string>

4.2 Update Strings for Localization

Change the language in the app, we have preconfigured several language options:

Click the icon on the top left corner
image
Click on Settings
Scroll to the bottom
image
Click on English to change the language

Customize the strings.xml file with your own information. Ensure support for multiple languages by updating the following directories:

  • values (default)
  • values-ar (Arabic)
  • values-de (German)
  • values-es (Spanish)
  • values-nl (Dutch)
  • values-pt (Portuguese)
  • values-fr (French)
  • values-zh (Chinese)
  • values-ckb (Kurdish)

If your language is not listed:

Go to app/src/main/res/values/strings.xml
Click on Open editor image Click on the icon image
Select the language you want to add
Ensure that your device's default language is set to the language that you just added. Close the app completely (swipe it away from recent apps) and reopen it.

Translate the strings in strings.xml from app/src/main/res/values-xx/

#Example:
#English (values/strings.xml)
<string name="login">Login</string>

#Chinese (values-zh/strings.xml)
<string name="login">登录</string>

Note: Some error messages are generated by the backend server and cannot be customized into local language for now.

5. Customize Application Features

Modify the App.kt file to configure and customize the features of your application.

//Example:
// If you need to disable settlement, remove `//`
ApplicationConfigOpts.isEnableSettlement = false

6. Building the app for release

Build>Generate Signed App Bundle or APK...

image

6.1 Generate aab file

Select the Android App Bundleradio button (first option)

6.2 Generate apk file

Select the APK radio button (second option)

6.3 If you do not have a key store

Click Create new... and Android Studio will guide you through the process of creating a key store

6.4 If you already have an existing key store

Click Choose existing... and select the key store that you created before

Make sure your credentials in machine's global gradle.properties matches the key store that you are using.

Fill in the Keystore password, key alias and Key password Click Next Choose debug or release Click Create

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages