🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@hmscore/react-native-hms-push

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hmscore/react-native-hms-push - npm Package Compare versions

Comparing version

to
6.7.0-300

example/src/Img/back.png

64

example/App.js
/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -17,14 +17,12 @@ Licensed under the Apache License, Version 2.0 (the "License")

import "react-native-gesture-handler";
import React from "react";
import { createStackNavigator } from "react-navigation-stack";
import { createAppContainer } from "react-navigation";
import MainPage from "./src/MainPage";
import CustomURI from "./src/CustomURI";
import LocalNotification from "./src/LocalNotification";
const AppNavigator = createStackNavigator(
{
import { View, Text, TouchableOpacity, Image } from 'react-native';
import { styles } from "./src/styles";
const pages = {
MainPage: {

@@ -37,9 +35,2 @@ screen: MainPage,

},
CustomURI: {
screen: CustomURI,
navigationOptions: {
headerTitle: "Push Kit Demo - Custom intent URI Page",
},
path: "app2",
},
LocalNotification: {

@@ -52,14 +43,45 @@ screen: LocalNotification,

},
},
{
initialRouteName: "MainPage",
}
);
};
const AppContainer = createAppContainer(AppNavigator);
export default class App extends React.Component {
state = {
pageItem: pages.MainPage,
}
changePage = (screenName) => {
if (pages[screenName]) {
this.setState({ pageItem: pages[screenName] })
}
}
goBack = () => {
this.changePage("MainPage");
}
render() {
return <AppContainer />;
let { pageItem } = this.state;
if (pageItem?.screen) {
let Page = pageItem.screen;
return (
<>
<View style={styles.header}>
{pageItem.path != "app1" && (
<TouchableOpacity onPress={this.goBack} style={{ marginRight: 20 }}>
<Image
source={require("./src/Img/back.png")}
style={styles.headerImage}
resizeMode= "contain"
/>
</TouchableOpacity>
)}
<Text style={styles.headerTitle}>{pageItem.navigationOptions.headerTitle}</Text>
</View>
<Page navigation={{ navigate: this.changePage }} />
</>
);
}
return <MainPage />;
}
}
/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -22,3 +22,3 @@ Licensed under the Apache License, Version 2.0 (the "License")

experimentalImportSupport: false,
inlineRequires: false,
inlineRequires: true,
},

@@ -25,0 +25,0 @@ }),

{
"name": "@hmscore/react-native-hms-push-demo",
"version": "6.5.0-300",
"version": "6.7.0-300",
"scripts": {

@@ -8,23 +8,12 @@ "android": "react-native run-android",

"test": "jest",
"lint": "eslint ."
},
"lint": "eslint ."},
"dependencies": {
"react": "16.6.0",
"react-native": "0.60.0",
"react-native-gesture-handler": "1.6.1",
"react-native-reanimated": "1.9.0",
"react-native-router-flux": "4.2.0",
"react-native-screens": "2.8.0",
"@hmscore/react-native-hms-push": "6.5.0-300"
"react": "17.0.1",
"react-native": "0.64.4",
"@hmscore/react-native-hms-push": "6.7.0-300"
},
"devDependencies": {
"@babel/core": "^7.6.2",
"@babel/runtime": "^7.6.2",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.59.0",
"ncp": "^2.0.0",
"react-test-renderer": "16.9.0"
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"metro-react-native-babel-preset": "^0.64.0"
},

@@ -34,2 +23,2 @@ "jest": {

}
}
}
/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -54,2 +54,6 @@ Licensed under the Apache License, Version 2.0 (the "License")

componentDidMount() {
if(this.state.subjectId === "<project_id>") {
alert("You have not added your subjectId to the demo. This will cause some functions not to work.");
}
this.onRemoteMessageReceivedListener = HmsPushEvent.onRemoteMessageReceived(

@@ -410,14 +414,2 @@ (result) => {

styles.buttonContainer,
styles.tertiaryButton,
styles.buttonContainerSlim,
]}
onPress={() => this.props.navigation.navigate("CustomURI")}
>
<Text style={styles.buttonText}>Open Custom intent URI Page</Text>
</TouchableOpacity>
</View>
<View style={[styles.container, styles.containerSlim]}>
<TouchableOpacity
style={[
styles.buttonContainer,
styles.secondaryButton,

@@ -424,0 +416,0 @@ styles.buttonContainerSlim,

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -131,2 +131,21 @@ Licensed under the Apache License, Version 2.0 (the "License")

},
header: {
height: 55,
backgroundColor: 'white',
elevation: 5,
alignItems: 'center',
paddingLeft: 15,
flexDirection: 'row'
},
headerImage: {
width: 30,
height: 30
},
headerTitle: {
fontWeight: '600',
fontSize: 20
},
});

@@ -5,4 +5,4 @@ {

"description": "React Native HMS Push Kit",
"version": "6.5.0-300",
"main": "index.js",
"version": "6.7.0-300",
"main": "src/index.js",
"repository": {

@@ -30,8 +30,6 @@ "type": "git",

"example",
"index.js",
"src",
"package.json",
"README.md",
"LICENSE",
"THIRD PARTY OPEN SOURCE SOFTWARE NOTICE.txt"
"LICENSE"
],

@@ -43,5 +41,7 @@ "peerDependencies": {

"devDependencies": {
"react": "16.6.0",
"react-native": "0.60.0"
}
"react": "17.0.1",
"react-native": "0.64.4",
"typescript": "^3.9.5"
},
"types": "src/index.d.ts"
}
/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

/*
Copyright 2020-2022. Huawei Technologies Co., Ltd. All rights reserved.
Copyright 2020-2023. Huawei Technologies Co., Ltd. All rights reserved.

@@ -4,0 +4,0 @@ Licensed under the Apache License, Version 2.0 (the "License")

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet