Crdzbird / floaty_chathead

Flutter Plugin to create your own floating chathead
MIT License
134 stars 22 forks source link

How to launch application from chathead? #10

Open varunkudalkar opened 3 years ago

varunkudalkar commented 3 years ago

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.

kwado-tech commented 3 years ago

@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

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

AbdArahman2001 commented 2 years ago

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