How to get Advertising ID in android programmatically

前端 未结 12 1582
迷失自我
迷失自我 2020-12-08 04:18

I want to get users Advertising ID programmatically.I used the below code from the developer site.But its not working

         Info adInfo = null;
                   


        
12条回答
  •  渐次进展
    2020-12-08 04:50

    You only need this package: implementation("com.google.android.gms:play-services-ads-identifier:17.0.0") It's not really listed anywhere but it's published on Mavne.

    Get Google Services using GoogleApiAvailabilityLight.getInstance

提交回复
热议问题