how to get started with android app development code example
Example 1: swift get app version and build
import Foundation
extension Bundle {
var shortVersion: String {
if let result = infoDictionary?["CFBundleShortVersionString"] as? String {
return result
} else {
assert(false)
return ""
}
}
var buildVersion: String {
if let result = infoDictionary?["CFBundleVersion"] as? String {
return result
} else {
assert(false)
return ""
}
}
var fullVersion: String {
return "\(shortVersion)(\(buildVersion))"
}
}
// Usage:
someLabel.text = Bundle.main.versionNumber
Example 2: how to get app package and app activity in android
adb shell dumpsys window windows | grep -E 'mCurrentFocus'