Digipass S3 is now DigipassONE. This section is currently being updated to reflect our new name.

Customizing Passport

Prev Next

Localization

The Passport App project contains string resources used in the user interface. The default English localizations are stored in <PASSPORT_HOME>/app/src/main/res/values/strings.xml, but you can add localizations for additional languages.

Adding a New Localization to Passport App

  1. Create a new folder in the project res folder using a name of the form values-<locale>, where <locale> is the locale identifier string (LCID). For example, values-en-rau for Australian English.

  2. Copy the res/values/strings.xml file into the newly created folder.

  3. Translate the string values in the XML file into the target language.

App Icon

To change the application icon, replace all the noknok_passport_icon.png files located in the following folder: <PASSPORT_HOME>/app/src/main/res.

Application Name

To change the application name from Passport, edit res/values/strings.xml. Modify the strings app_name and full_app_name.

Update these values in strings.xml for all locales.

<string name="app_name">Passport</string>
startcode<string name="full_app_name">Nok Nok\u2122 Passport</string>

The About Passport Tab UI

Changing the Text

Edit file <PASSPORT_HOME>/app/src/main/res/values/strings.xml.

Change the following strings:

  • The name of the About tab:
    <string name="action_about">

  • The text above the logo in the About tab:
    <string name="about_text_1">

  • The text below the logo in the About tab:
    <string name="about_text_2">

  • Copyright text:
    <string name="about_text_3">

The following example shows the About tab UI text that can be customized:

Localizing

To localize the About UI, change file <PASSPORT_HOME>/app/src/main/res/values-<locale>/strings.xml

Localize the following strings:

  • action_about

  • about_text_1

  • about_text_2

  • about_text_3

Changing the Package Name

To change the package name, you must update the manifest file located at <PASSPORT_HOME>/app/src/main/AndroidManifest.xml.

This example replaces the package entry shown here:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.noknok.android.passport2"

with

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.test.newApp"

Passport SDK Support

By default, Passport App allows other apps to remotely call it when SDKType is set to PASSPORTSDK. Disable this functionality if it isn't needed by removing the following exported entry point activity declarations from the Passport App manifest file as shown:

<!-- Transparent activity for Passport API Support-->
<activity
   android:name="com.noknok.android.passportsdksvc.PassportSDKIntentActivity"
   android:configChanges="orientation|keyboard|screenSize"
   android:excludeFromRecents="true"
   android:screenOrientation="locked"
   android:theme="@style/nnlThemeTransparent"
   android:exported="true">
</activity>
<activity
   android:name="com.noknok.android.passportsdksvc.ManageActivity"
   android:label="Manage Registrations"
   android:theme="@style/StartTheme"
   android:excludeFromRecents="true"
   android:configChanges="orientation|keyboardHidden|screenSize">
</activity> 

Package Name References

When you change the package name, you must update references to resource files.

In the folder <PASSPORT_HOME>/app/src/main/java/com/noknok/android/passport/ui change the import statements in the following files:

  • AboutActivity.java

  • MainActivity.java

  • MessageActivity.java

  • PassportApp.java

  • WebViewFragment.java

For example, replace:

import com.noknok.android.passport2.R;

with

import com.test.newApp.R;

Adding an Authenticator

To add an authenticator to Passport App, refer to Embedding an Authenticator in the Android Developer Guide.

The Client Configuration File

You can further configure Passport App using the Client Configuration file, mfac_config.json. This file enables you to control features such as PIN length, number of PIN retry attempts, whether or not to prompt the user to select an authenticator, and so on. Create mfac_config.json and place it in a res/raw subfolder you create inside the module. For information about mfac_config.json, refer to section The Client Configuration File in the Android Developer Guide.

Enable TLD Checking

By default, top-level domain (TLD) checking during Facet ID validation is disabled. If you intend to use your customized Passport App through an App Link, consider enabling TLD checking to improve security.

To enable TLD checking, add the publicSuffixList key to mfac_config.json, the client configuration file, and assign your list of valid top-level domains to it. For information on how to assign a value to a field in mfac_config.json, refer to The Client Configuration File.