How to use the jpush-react-native.setAlias 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 / example / react-native-iOS / set_activity.js View on Github external
setAlias() {
		if (this.state.alias !== undefined) {
			JPushModule.setAlias(this.state.alias, () => {
				// console.log('success set alias');
				Alert.alert('success set alias')
			},() => {
				Alert.alert('fail set alias')
				// console.log('fail set alias');
			});
		};
	}
github jpush / jpush-react-native / react-native-iOS / set_activity.js View on Github external
setAlias() {
		if (this.state.alias !== undefined) {
			JPushModule.setAlias(this.state.alias, () => {
				// Alert.alert('成功', '设置alias 成功',[{text: 'OK'}]);
				console.log('success set alias');
			},() => {
				// Alert.alert('失败','设置alias 失败',[{text:'fail'}]);
				console.log('fail set alias');
			});
		};
	},
github jpush / jpush-react-native / react-native-android / set_activity.js View on Github external
setAlias() {
		if (this.state.alias !== undefined) {
			JPushModule.setAlias(this.state.alias, () => {
				console.log("Set alias succeed");
			}, () => {
				console.log("Set alias failed");
			});
		}
	}
github jpush / jpush-react-native / example / react-native-android / set_activity.js View on Github external
setAlias() {
		if (this.state.alias !== undefined) {
			JPushModule.setAlias(this.state.alias, (map) => {
				if (map.errorCode === 0) {
					console.log("set alias succeed");
				} else {
					console.log("set alias failed, errorCode: " + map.errorCode);
				}
			});
		}
	}