callkeep icon indicating copy to clipboard operation
callkeep copied to clipboard

how to pass variable received onBackgroundMessage when app is back to foreground

Open ahmedJD opened this issue 4 years ago • 4 comments

i'm using agora with callkeep to join the same channel when app is in background or in foreground. how can i pass the channel id received in onBackgroundMessage(fcm) to callkeep answerCall() method.

ahmedJD avatar Dec 14 '20 23:12 ahmedJD

Did you find solution for this?

arif2k17 avatar Jan 27 '21 16:01 arif2k17

i used shared prefrences to pass variable from background Message handler to answerCall method but i think it's not the better solution

ahmedJD avatar Jun 09 '21 12:06 ahmedJD

@ahmedJD Use IsolateNameServer to pass data from onbackgroundMessagehandler to application and at reciever port end store them in class level variables. Now you will be able to use these variables in answercall.

shreyansh2211 avatar Aug 13 '21 09:08 shreyansh2211

@shreyansh2211 do you have an example how to use IsolateNameServer to push data and get them in other function method

ahmedJD avatar Aug 24 '21 17:08 ahmedJD