c sqlserver mysql_sqlserver模仿mysql函数FIND_IN_SET,group_concat的功能

本文介绍了一个React Native应用如何集成极光推送服务。通过使用jpush-react-native模块,可以轻松实现推送消息接收、通知监听等功能。文章展示了关键代码片段,包括组件挂载时初始化推送服务、监听不同事件及组件卸载时清理监听器等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

风云坤:import React, { Component } from 'react';|@|import {|@| AppRegistry,|@| BackAndroid,|@| StyleSheet,|@| Text,|@| View|@|} from 'react-native';|@|import JPushModule from 'jpush-react-native';|@||@|export default class xuexi6 extends Component {|@||@| constructor(props) {|@|   super(props);|@||@|   this.state = {|@|     bg: '#ffffff',|@|     appkey: 'AppKey',|@|     imei: 'IMEI',|@|     package: 'PackageName',|@|     deviceId: 'DeviceId',|@|     version: 'Version',|@|     pushMsg: 'PushMessage',|@|     registrationId: 'registrationId',|@|   };|@|   |@| }|@||@| componentDidMount() {|@|   JPushModule.getInfo((map) => {|@|     this.setState({|@|     appkey: map.myAppKey,|@|     imei: map.myImei,|@|     package: map.myPackageName,|@|     deviceId: map.myDeviceId,|@|     version: map.myVersion|@|     });|@|   });|@|   JPushModule.notifyJSDidLoad((resultCode) => {|@|     if (resultCode === 0) {|@|     }|@|   });|@|   JPushModule.addReceiveCustomMsgListener((map) => {|@|     this.setState({|@|     pushMsg: map.message|@|     });|@|     console.log("extras: " + map.extras);|@|   });|@|   JPushModule.addReceiveNotificationListener((map) => {|@|     console.log("alertContent: " + map.alertContent);|@|     console.log("extras: " + map.extras);|@|     // var extra = JSON.parse(map.extras);|@|     // console.log(extra.key + ": " + extra.value);|@|   });|@|   JPushModule.addReceiveOpenNotificationListener((map) => {|@|     console.log("Opening notification!");|@|     console.log("map.extra: " + map.extras);|@|     //JPushModule.jumpToPushActivity("SecondActivity");|@|   });|@|   JPushModule.addGetRegistrationIdListener((registrationId) => {|@|     console.log("Device register succeed, registrationId " + registrationId);|@|   });|@| }|@||@| componentWillUnmount() {|@|   JPushModule.removeReceiveCustomMsgListener(receiveCustomMsgEvent);|@|   JPushModule.removeReceiveNotificationListener(receiveNotificationEvent);|@|   JPushModule.removeReceiveOpenNotificationListener(openNotificationEvent);|@|   JPushModule.removeGetRegistrationIdListener(getRegistrationIdEvent);|@|   console.log("Will clear all notifications");|@|   JPushModule.clearAllNotifications();|@| }|@||@| render() {|@|   return (|@|     |@|     |@|       Welcome to React Native!dddddddddddddddd|@|     |@|     |@|       To get started, edit index.android.js|@|     |@|     |@|       Double tap R on your keyboard to reload,{'\n'}|@|       Shake or press menu button for dev menu|@|     |@|     |@|   );|@| }|@|}|@||@|const styles = StyleSheet.create({|@| container: {|@|   flex: 1,|@|   justifyContent: 'center',|@|   alignItems: 'center',|@|   backgroundColor: '#F5FCFF',|@| },|@| welcome: {|@|   fontSize: 20,|@|   textAlign: 'center',|@|   margin: 10,|@| },|@| instructions: {|@|   textAlign: 'center',|@|   color: '#333333',|@|   marginBottom: 5,|@| },|@|});|@||@|AppRegistry.registerComponent('xuexi6', () => xuexi6);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值