Skip to content

Commit bca8dd2

Browse files
task(VC-666): sample app changes
1 parent 1fc63a4 commit bca8dd2

File tree

2 files changed

+9490
-7
lines changed

2 files changed

+9490
-7
lines changed

example/src/screens/DialerScreen.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
Image,
66
TextInput,
77
Button,
8-
BackHandler,
98
Alert,
109
Keyboard,
1110
Platform,
@@ -81,10 +80,9 @@ const DialerScreen = ({ route, navigation }: any) => {
8180
button: 'Some text',
8281
};
8382
try {
84-
VIForegroundService.getInstance()
85-
.startService(notificationConfig)
83+
VIForegroundService.startService(notificationConfig)
8684
.then(() => console.log('Service started'))
87-
.catch((err) => console.error(err));
85+
.catch((err: any) => console.error(err));
8886
} catch (e) {
8987
console.error(e);
9088
}
@@ -142,10 +140,9 @@ const DialerScreen = ({ route, navigation }: any) => {
142140
if (canStart) {
143141
startForegroundService();
144142
} else {
145-
VIForegroundService.getInstance()
146-
.stopService()
143+
VIForegroundService.stopService()
147144
.then(() => console.log('Service stopped'))
148-
.catch((err) => console.error(err));
145+
.catch((err: any) => console.error(err));
149146
}
150147
setForegroundServiceRunning(canStart);
151148
}}

0 commit comments

Comments
 (0)