OAID collection
Table of content
Supported devices:
Manufacturer | OS version |
---|---|
Huawei | All |
Xiaomi | MIUI 10.2 |
Vivo | FuntouchOS 9 |
OPPO | Color OS 7.0 |
Lenovo | ZUI 11.4 |
Samsung, Meizu, Nubia, ZTE, ASUS, OnePlus, Freeme OS, Ssui OS | Android 10 |
Adding to your project
project build.gradle
allprojects {
repositories {
// ...
maven { url 'https://developer.huawei.com/repo/' }
}
}
Download aar from msa alliance to your module libs folder
module build.gradle
implementation files('libs/msa_mdid_1.0.13.aar')
implementation 'com.appsflyer:oaid:5.2.0'
Standalone usage
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
Thread {
val info = OaidClient(this, 1, TimeUnit.SECONDS).fetch()
if (info != null) {
println(info.id)
val lat = info.lat
if (lat != null) println(lat)
}
}.start()
}
}
Important
Time to fetch oaid is around 10 - 1000 ms
When submitting an issue please specify your AppsFlyer sign-up (account) email , your app ID , production steps, logs, code snippets and any additional relevant information.