This article describes how to make changes to the K2 Mobile for Android app so that a modified version can be distributed through any MDM or enterprise store. Please see the Distributing K2 Mobile with Mobile Device Management (MDM) software article for an overview of deploying the mobile app with MDM software.
To distribute an app using an MDM platform, you need the unsigned K2 Mobile for Android app. K2 provides this app to customers with a current maintenance agreement; contact your K2 representative for details. You can then make changes to the configuration file, such as the default server value and other settings. Not every setting is exposed in the configuration file. For instance, the user name and password are stored on the device following Android’s security guidelines.
To change the application icon and title, you have to use the APK Icon Editor. Note that the APK Icon Editor is recommended but not supported by K2.
The configuration file is packaged within the app. By changing the app file extension from .apk to .zip, you will find the configuration file (inside the assets folder) and can edit it using a standard text editor. Once you’re done editing it, you can change the app file extension back to .apk. Then sign the app using your own signing key (not provided by K2) in order to distribute the app.
Many MDM software platforms do the signing automatically for you. As K2 does not test with any specific MDM software, if you have any questions about signing and distributing your customized app, contact your MDM software vendor.
If you do not have the APK Icon Editor, download it here.
Note for Mac users: When you open the APK Icon Editor App, you may get a security warning. If you do, close the notification and open your System Preferences. Navigate to Security and Privacy, located at the top of the window. Click the General tab, and then click the lock icon at the bottom of the window to allow changes. Enter your password when prompted. Under the bottom section, you will find Allow apps downloaded from: and you will see the APK Icon Editor.app was blocked from opening. Click Open anyway and a new window will open asking for confirmation Click Open and then you can open the APK Icon Editor app.
Once you have the APK Icon Editor application open, perform these steps:
You now have access to change the icon and application name. When changing the application name, be sure to click Apply to All before packing the APK.
Once complete, pack and save the APK file – it is now ready for distribution.
There are a number of items you can modify in the app before distributing it within your organization. Follow these steps to modify the default appearance and settings:
Change the values in the configuration.properties file but use only true or false values and, when changing text color, use the hex color code of the color you choose (you can find converters online). Note that images must be the same pixel size as those in the APK.
# Copyright (c) 2015. K2 Workflow. All rights reserved
# NOTE : All colors must have a full hex of #RRGGBB or the application will not run
# Values for the startup screen of the application and the login screen
# Values for the menu
#default input values
In the configuration.properties file, you can include a key for DEFAULT_SERVER_VALUE.
Should you leave the DEFAULT_SERVER_VALUE empty, no default will be set.
You can customizethe K2 Mobile app to include your company's name and branded images.