Skip to content

Commit 4557cda

Browse files
author
“Linh
committed
Update version to publish, add navigation for example
1 parent 84d9033 commit 4557cda

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

example/src/Home/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import RNCallKeep from 'react-native-callkeep';
1212
CallKeepService.instance().setupCallKeep()
1313
export default function Home() {
1414
const navigation = useNavigation();
15-
15+
CallKeepService.navigation = navigation
1616
const display = () => {
1717
// Start a timer that runs once after X milliseconds
1818
//rest of code will be performing for iOS on background too

example/src/services/CallKeepService.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ const answerOption = {
1919
notificationSound: undefined, //raw
2020
};
2121
// this service only focus for Android
22+
2223
export class CallKeepService {
2324
private static _instance?: CallKeepService;
24-
private setupReady?: boolean;
25+
static navigation: any;
2526
constructor() {
2627
//setup callkeep
2728
// this.setupCallKeep();
@@ -138,6 +139,8 @@ export class CallKeepService {
138139
const { callUUID } = answerData;
139140
// called when the user answer the incoming call
140141
//navigate to another screen
142+
//some project need to rehandle with redux state or other state manager refer https://github.com/linhvovan29546/react-native-full-screen-notification-incoming-call/issues/17#issuecomment-1318225574
143+
CallKeepService.navigation.navigate('Detail');
141144
}
142145
onCallKeepEndCallAction(answerData: any) {
143146
const { callUUID } = answerData;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-full-screen-notification-incoming-call",
3-
"version": "0.1.10",
3+
"version": "0.1.11",
44
"description": "Android full screen notification incoming call for React Native",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

0 commit comments

Comments
 (0)