How to use the jpush-react-native.setTags function in jpush-react-native

To help you get started, we’ve selected a few jpush-react-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jpush / jpush-react-native / react-native-iOS / set_activity.js View on Github external
setTag() {
		if (this.state.tag !== undefined) {
			JPushModule.setTags([this.state.tag], () => {
				// Alert.alert('成功', 'tags 成功',[{text: 'OK'}]);
				console.log('success set tag');
			}, () => {
				// Alert.alert('失败','设置alias 失败',[{text:'fail'}]);
				console.log('fail set tag');
			});
		};
	},
	setAlias() {
github jpush / jpush-react-native / example / react-native-android / set_activity.js View on Github external
setTag() {
		if (this.state.tag !== undefined) {
			/*
			 * 请注意这个接口要传一个数组过去,这里只是个简单的示范
			 */
			JPushModule.setTags(this.state.tag.split(","), (map) => {
				if (map.errorCode === 0) {
					console.log("Tag operate succeed, tags: " + map.tags);
				} else {
					console.log("error code: " + map.errorCode);
				}
			});
		}
	}
github jpush / jpush-react-native / react-native-android / set_activity.js View on Github external
setTag() {
		if (this.state.tag !== undefined) {
			/*
			* 请注意这个接口要传一个数组过去,这里只是个简单的示范
			*/
			JPushModule.setTags(["VIP", "NOTVIP"], () => {
				console.log("Set tag succeed");
			}, () => {
				console.log("Set tag failed");
			});
		}
	}
github jpush / jpush-react-native / example / react-native-iOS / set_activity.js View on Github external
setTags() {
		JPushModule.setTags(['tag1', 'tag2'], (result)=> {
			Alert.alert(JSON.stringify(result))
		})
	}