floaty_chathead icon indicating copy to clipboard operation
floaty_chathead copied to clipboard

How to launch application from chathead?

Open varunkudalkar opened this issue 3 years ago • 2 comments

How can we launch our application (if it is not running already, but chathead is open) from the chathead? I have created chathead with headers and added a FloatyHeadButton, click on this button app should open with its main activity.

varunkudalkar avatar Jul 01 '21 18:07 varunkudalkar

@Crdzbird please any update on this? as i also require this functionality.

My usecase, involves bringing the application to foreground when a button (with tag) in the floaty-head is tapped. With this, a simple method-channel call to bring the application foreground will work but

Since the floaty-chathead top-level callback parameter (Function(String) callBackFunction) required by FloatyHead.registerOnClickListener method happens to run another thread, i tried the following

  • Spawning a new isolate to dispatch an event (on callback trigger) which is being listened to in the main function but was unsuccessful because of the interfaces presented by the floaty-chathead package and dart's Isolate.

What do you think? Please give some thoughts to this and any suggestion is appreciated.

kwado-tech avatar Aug 09 '21 07:08 kwado-tech

@Crdzbird @kwado-tech
@varunkudalkar Have you found a successful way to implement this? because I need to implement a similar approach.

AbdArahman2001 avatar Aug 28 '22 03:08 AbdArahman2001