android 怎么设置极光推送的标签
发布网友
发布时间:2022-04-24 14:13
我来回答
共1个回答
热心网友
时间:2023-08-18 16:17
public class SetTags {
public static void settags(Context context, UserData user, Set<String> tags) {
TagAliasCallback callback = new TagAliasCallback() {
@Override
public void gotResult(int responseCode, String alias, Set<String> tags) {
int code = responseCode;
switch (code) {
case 0:
//设置成功
break;
case 6002:
//"Failed to set alias and tags e to timeout. Try again after 60s.";
break;
default:
//"Failed with errorCode = " + code;
}
}
};
JPushInterface.setTags(context, tags, callback);
}
}
如上,调SetTags的静态方法settags(Context context, UserData user, Set<String> tags);