Overview
This article addresses the use of device Operating System (OS) APIs by the Field Force Manager (FFM) Android app for functionalities like Active Keyboard, Disk Space, File Timestamp, System Boot Time, and User Defaults. This information helps users understand how the app interacts with device OS APIs.
OS APIs Used in FFM Android App:
-
Active Keyboard
-
The
InputMethodManager
API is used in the FFM app to manage the keyboard in certain situations:-
Hiding the keyboard when the user touches outside the input field or presses the "Enter" key.
-
Displaying the keyboard when selecting a custom text view (e.g., email input) in specific activities.
-
-
-
Disk Space
-
The app utilizes the
StatFs
class in two key scenarios:-
Calculating disk cache size (though this method is currently unused and can be removed).
-
Checking available disk capacity when saving a signature image.
-
- The methods
getAvailableSpace()
,getFreeSpace()
,getTotalSpace()
, andgetUsableSpace()
are not used.
-
-
File Timestamp
- The methods
lastModified()
andFile.setLastModified()
are used when saving images from the gallery. The original timestamp is retrieved from the image and applied to the copy to ensure consistency. - Other timestamp-related classes, such as
java.nio.file.attribute.FileTime
andBasicFileAttributes
, are not used.
- The methods
-
System Boot Time
-
The
SystemClock.uptimeMillis
method is used to stop animations after a set interval (200ms). This is in line with Android’s recommendation to useuptimeMillis
for measuring time intervals. -
Other methods like
SystemClock.elapsedRealtime()
,Process.getStartElapsedRealtime()
, andSystem.getProperty("ro.runtime.firstboot")
are not used.
-
-
User Defaults
-
The app uses
SharedPreferences
andgetSharedPreferences()
to define and read app-specific settings, such as launching the app at boot time after successful login and EULA acceptance. These preferences are stored inMODE_PRIVATE
, meaning they are only accessible by the app, ensuring user privacy. -
PreferenceManager
andgetDefaultSharedPreferences()
are not used.
-
Conclusion
The FFM Android app uses specific device OS APIs to manage keyboard interactions, disk space, file handling, system events, and user preferences. All API usages are integral to the app's functionality and have been implemented in compliance with best practices for Android development. If further assistance is needed, please reach out to our support team.