Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.8k views
in Technique[技术] by (71.8m points)

What are the allowed values for Huawei AdsKit `AdParam.Builder`?

What are the allowed enum values in AdParam.Builder, eg. setGender(int value)?

I've tried using 1 and 2, but having Root obj class .. is invalid in the log:

2021-01-13 00:20:22.041 2138-2324 W/HiAdSDK.jd:  Root obj class (class java.lang.Object) is invalid
2021-01-13 00:20:22.042 2138-2324 W/HiAdSDK.jd:  toJson jsex

PS. using implementation 'com.huawei.hms:ads-lite:13.4.37.300'


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

What are the allowed enum values in AdParam.Builder, eg. setGender(int value)?

Please kindly refer to com.huawei.hms.ads.Gender,value 0 is for MALE, value 1 is for FEMALE.

For more details, see API documentation here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...