-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call Accept is not working at notification widget on Android. [ package version: 1.1.1 ] #418
Labels
needs more info
Needs more info from the issue author.
Comments
Jobaer-hassan-orangetoolz
changed the title
Call Accept is not working at notification widget at Android. [ package version: 1.1.1 ]
Call Accept is not working at notification widget on Android. [ package version: 1.1.1 ]
Sep 1, 2024
Hello @Jobaer-hassan-orangetoolz thanks for reaching out. Can you post any device logs from |
Also, please format your code block using triple backticks so it is easier for us to review your code. |
I have cat logs @mhuynh5757
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
For a long time we are using twilio..After implementing new version 1.1.1 , when a incoming call happens , A notification widget arrives and if i click the accept button it doesn't do anything.No logs at terminal.checked all kinds implementation including the test app provided with this package.but got no clue if there is anything wrong in my implementation.
Reproduction Steps ( In my case )
Expected Behavior
when i click accept it will accept the call.
Actual Behavior
call accept on notification widget is not working at all.
my code implementation
const createCallEvent = ({
callConnect: callOut,
callInvite: callIn,
data,
actionType = 'in',
dispatch,
callRef,
}: callEventActionInterface) => {
let newCallRes, callInviteRef;
if (actionType === 'in') {
callInviteRef = new CustomCallInvite(
{
uuid: callIn?._uuid || '',
customParameters: callIn?._customParameters || {test: ''},
from: callIn?._from || '',
callSid: callIn?._callSid || '',
to: callIn?._to || '',
},
CallInvite.State.Pending,
);
}
newCallRes = new CustomCall({
uuid: actionType === 'in' ? callIn._uuid : callOut._uuid,
customParameters:
actionType === 'in'
? callIn._customParameters
: callOut._customParameters,
from: actionType === 'in' ? callIn._from : data.from,
sid: actionType === 'in' ? callIn._callSid : callOut._sid,
to: actionType === 'in' ? callIn._to : data.to,
isMuted: false,
isOnHold: false,
});
if (actionType === 'in' && callInviteRef) {
callInviteAcceptedV2(callInviteRef);
callInviteRejectedV2(callInviteRef);
cancelledCallInviteV2(callInviteRef);
callInviteNotificationTappedV2(callInviteRef);
}
if (newCallRes) {
callRef.current = newCallRes;
callOnRinging(newCallRes);
callOnConnected(newCallRes, dispatch);
callOnDisconnected(newCallRes);
callOnConnectFailure(newCallRes);
callOnReconnecting(newCallRes);
callOnReconnected(newCallRes);
} else {
callCreateError();
}
};
// version: 1.1.1 (latest)
const callInviteAcceptedV2 = async (call: any) => {
call.on(CustomCallInvite.Event.Accepted, (accepted: any) => {
global.inviteCallHandler(accepted, 'callInviteAccepted');
});
};
const callInviteRejectedV2 = async (call: any) => {
call.on(CustomCallInvite.Event.Rejected, (rejected: any) => {
global.inviteCallHandler(rejected, 'callInviteRejected');
});
};
const cancelledCallInviteV2 = async (call: any) => {
call.on(CustomCallInvite.Event.Cancelled, (cancelled: any) => {
global.inviteCallHandler(cancelled, 'cancelledCallInvite');
});
};
const callInviteNotificationTappedV2 = async (call: any) => {
call.on(CustomCallInvite.Event.NotificationTapped, (data: any) => {
global.inviteCallHandler(
data,
CustomCallInvite.Event.NotificationTapped as any,
);
});
};
Software and Device Information
Please complete the following information.
Expecting a working solution:
Please guide me to the exact reason why this happens and if i am doing something wrong while implementing.
The text was updated successfully, but these errors were encountered: