Closed Mr-Hqq closed 5 years ago
Please Answer.
Please provide more informations, like in android
or ios
device, and attach your push payload
Its android emulator. and the same data and notification to another app has been sent. and this app don't received notification.
When i send my push too my app return connectionStatus Instead message from ChabokMessageReceived event.
For any team to be able to support and handle questions, there's a need to be provided more information. So please provide a sample code snippet of your usage, or related exception/error message, or more info generally about whats happening. Your question is not clear.
This is my usage code
let chabokEmitter = null
const SIZE = 40;
class Home extends Component {
constructor(props) {
super(props);
this.state = {
isLoading: false,
activeTab: 'inOrder',
newWork: false,
message: {}
};
chabokEmitter = new NativeEventEmitter(NativeModules.AdpPushClient);
}
componentWillMount() {
const {auth, work, history} = this.props;
if (auth.status === true) {
this.setState({activeTab: 'inOrder'})
} else {
this.setState({activeTab: 'outOfOrder'})
}
const options = {
"appId": "---",
"apiKey": "---",
"username": "---",
"password": "---",
"isDev": true
};
const USER = auth.id.toString() + "_repairman";
this.chabok = new chabok.AdpPushClient();
this.chabok.initializeApp("chabokdemos", options, (response) => {
console.log('app initialized', response)
});
this.chabok.register(USER, []);
work.isWork ? history.push('/newRequest'): '';
}
componentDidMount() {
chabokEmitter.addListener(
'connectionStatus',
(status) => {
console.log('connectionStatus', status)
}
);
chabokEmitter.addListener(
'ChabokMessageReceived',
(message) => {
console.log(message)
this.setState({newWork: true, message: message});
}
);
}
this is image of whats happend when i send push:
actually when i send push has to received to this callBack:
chabokEmitter.addListener(
'ChabokMessageReceived',
(message) => {
console.log(message)
this.setState({newWork: true, message: message});
}
);
but below callBack has action:
chabokEmitter.addListener(
'connectionStatus',
(status) => {
console.log('connectionStatus', status)
}
);
I edited your issue.
Your logs shows that you are getting disconnected when receiving a push.
Check your panel to see why your message is not delivered to that device. And send us an example similar payload of your push
Hi! When i send my push too my app return connectionStatus Instead message from ChabokMessageReceived event.