Back to top

Configure your server URL and password through an Android intent

Last updated December 14th, 2023

When you download and install the Knox E-FOTA On-Premises agent app, you can choose to set the server URL and password through an Android intent. To do so, refer to the following sample code:

// package name, action
final String PACKAGE_NAME   = "com.samsung.android.efotaagent";
final String ACTION_CONFIG_MODE = PACKAGE_NAME + ".CONFIG_MODE";
final String ACTION_SERVER_URL = PACKAGE_NAME + ".SERVER_URL";
final String ACTION_BKS_PASSWORD = PACKAGE_NAME+".BKS_INFO";

// set Config mode
final String CONFIG_MODE_EXTRA = "MODE";
final String CONFIG_MODE_FILE = "file";
final String CONFIG_MODE_INTENT = "intent";
// set server URL
final String SERVER_URL_EXTRA = "URL";
final String SERVER_URL = "https://example.server.url.com/admin/";
// set server password
final String BKS_INFO_EXTRA = "BKS";
final String BKS_PASSWORD = "password_of_server";
// set config mode to intent
sendBroadcast(new Intent()
       .setAction(ACTION_CONFIG_MODE)
       .putExtra(CONFIG_MODE_EXTRA, CONFIG_MODE_INTENT)
       .setPackage(PACKAGE_NAME)
        );
// set URL by intent
sendBroadcast(new Intent()
       .setAction(ACTION_SERVER_URL)
       .putExtra(SERVER_URL_EXTRA, SERVER_URL)
       .setPackage(PACKAGE_NAME)
        );
// set password by intent
sendBroadcast(new Intent()
       .setAction(ACTION_BKS_PASSWORD)
       .putExtra(BKS_INFO_EXTRA, BKS_PASSWORD)
       .setPackage(PACKAGE_NAME)
        );
// set config mode to file (efota_config)
sendBroadcast(new Intent()
       .setAction(ACTION_CONFIG_MODE)
       .putExtra(CONFIG_MODE_EXTRA, CONFIG_MODE_FILE)
       .setPackage(PACKAGE_NAME)
        );

To learn more about how to download and install the Knox E-FOTA On-Premises agent app, see Step 5 — Download and install the agent app.

Is this page helpful?