Skip to content

Commit

Permalink
feat: androind callkeep fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MdTeach committed Sep 12, 2023
1 parent e06b2b5 commit 0375fea
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ function HeadlessCheck({isHeadless}) {
return <App isCallAccepted={isCallAccepted} />;
}

if (Platform.OS === 'android') {
CallKeepHelper.setupCallKeep();
RNCallKeep.setAvailable(true);
}
messaging().setBackgroundMessageHandler(async remoteMessage => {
if (Platform.OS === 'android' && CallKeepHelper.isVideoCall(remoteMessage)) {
await CallKeepHelper.setupCallKeep();
RNCallKeep.setAvailable(true);

const caller = CallKeepHelper.getCaller(remoteMessage);
const addressTrimmed = CallKeepHelper.formatEthAddress(caller);
const uuid = getUUID();
Expand Down

0 comments on commit 0375fea

Please sign in to comment.