-
Notifications
You must be signed in to change notification settings - Fork 1
Build Info
levching edited this page Apr 14, 2020
·
4 revisions
With the AN_Build class, you can get information about the current build, extracted from system properties. See the example below:
using SA.Android.OS;
...
//The base OS build the product is based on.
Debug.Log("AN_Build.VERSION.BASE_OS: " + AN_Build.VERSION.BASE_OS);
//The current development codename, or the string "REL" if this is a release build.
Debug.Log("AN_Build.VERSION.CODENAME: " + AN_Build.VERSION.CODENAME);
//The internal value used by the underlying source control to represent this build.
Debug.Log("AN_Build.VERSION.INCREMENTAL " + AN_Build.VERSION.INCREMENTAL);
//The developer preview revision of a prerelease SDK.
Debug.Log("AN_Build.VERSION.PREVIEW_SDK_INT: " + AN_Build.VERSION.PREVIEW_SDK_INT);
//The user-visible version string.
Debug.Log("AN_Build.VERSION.RELEASE: " + AN_Build.VERSION.RELEASE);
//The SDK version of the software currently running on this hardware device.
Debug.Log("AN_Build.VERSION.SDK_INT: " + AN_Build.VERSION.SDK_INT);
//The user-visible security patch level.
Debug.Log("AN_Build.VERSION.SECURITY_PATCH: " + AN_Build.VERSION.SECURITY_PATCH);
The most common use case of AN_Build class is to check the current device API level. See the simple example below how you can do it using Android Native Pro:
using SA.Android.OS;
...
if (AN_Build.VERSION.SDK_INT >= AN_Build.VERSION_CODES.O) {
//Current system runs android 8.0 oreo (api 26)
}
Reliable and high-quality Unity Development service. Let's Talk!
Website | AssetStore | LinkedIn | Youtube | Scripting Reference
- Build Info
- Dark Mode
- Package Info
- Runtime Permissions
- Run External App
- Immersive Mode
- PackageManager
- Popups & Preloaders
- Rate Us Dialog
- Activity
- Intent
- Settings Page
- Media Player
- Date Picker Dialog
- Time Picker Dialog
- Locale
- Wheel Picker Dialog
- Developer Console Setup
- Connecting to The Service
- Purchase Flow
- Transactions Validation
- Subscriptions
- Licensing
- Getting Started
- Games Sing-in
- Server-side API Access
- Leaderboards
- Achievements
- Saved Games
- Image Manager
- Settings Intent