jiusanzhou / flutter_floatwing

A Flutter plugin that makes it easier to make floating/overlay window for Android with pure Flutter. 一个可以用纯粹的Flutter来开发Android浮动窗口的插件。
Other
169 stars 28 forks source link

Determine whether the current thread is a float ? #5

Closed cnyunguo closed 2 years ago

cnyunguo commented 2 years ago

Determine whether the current thread is a float ?

jiusanzhou commented 2 years ago

Hi @cnyunguo , FloatwingPlugin().isWindow can help you.

cnyunguo commented 2 years ago

Hi @cnyunguo , FloatwingPlugin().isWindow can help you.

您好,您也是中国人啊,真棒,我跟您说一下我的想法,其实我最想应用的是多entry-point的办法,但是release下会报告 Could not run the run main Dart entrypoint. ,可能跟一些插件有关,所以我最后妥协,还是使用main方法入口的方法, 这样会带来一个问题,有一些代码我不想在 floatwindow里面执行,您提到的FloatwingPlugin().isWindow,主进程和悬浮窗进程返回的都是false。

cnyunguo commented 2 years ago

Hi @cnyunguo , FloatwingPlugin().isWindow can help you.

您好,您也是中国人啊,真棒,我跟您说一下我的想法,其实我最想应用的是多entry-point的办法,但是release下会报告 Could not run the run main Dart entrypoint. ,可能跟一些插件有关,所以我最后妥协,还是使用main方法入口的方法, 这样会带来一个问题,有一些代码我不想在 floatwindow里面执行,您提到的FloatwingPlugin().isWindow,主进程和悬浮窗进程返回的都是false。

我描述的可能有点混乱,希望您能理解。

cnyunguo commented 2 years ago

谢谢您,我使用 FloatwingPlugin().isWindow 之前执行了一下 FloatwingPlugin().ensureWindow() ,解决了这个问题。

cnyunguo commented 2 years ago

另外,是否可以在悬浮窗内弹出主窗口。launchApp

jiusanzhou commented 2 years ago

另外,是否可以在悬浮窗内弹出主窗口。launchApp

I have a plan to implement this feature, but not in currently released version. Maybe this weekend I will release a new version to support it.

cnyunguo commented 2 years ago

Nice!周末一定要加上去哈,我等着用呢,嘿嘿!

jiusanzhou commented 2 years ago

I think we should close this issue, any feature requests we can open a new issue. Thank you.

jiusanzhou commented 2 years ago

@cnyunguo hi, open the main activity in window, has been released in v0.2.0

cnyunguo commented 2 years ago

@cnyunguo hi 打开主activity的功能,前天晚上已经发布了 v0.2.0

嗯嗯,已经第一时间拉下来了,不过现在遇到一个新的问题,你有时间跟我一起看看吗,这个问题是跟另外一个常用插件的冲突,我的vx:baoqizzz

cnyunguo commented 2 years ago

@jiusanzhou 我先简单说一下,我这边用到了 amap_map_fluttify 这个flutter插件,功能上对这个插件依赖度挺高的,主进程里面初始化这个插件之后,我启动float window ,主进程就会出问题,float window里面并没有调用amap_map_fluttify的功能,根据amap_map_fluttify日志,问题应该是amap_map_fluttify回调出问题了,目前还没思路,这个已经卡了2天了,希望您有时间帮我看看分析一下。

jiusanzhou commented 2 years ago

Hi @cnyunguo, I have some advice

  1. Open a new issue to track a new problem
  2. Provide more information about what you are facing, even more a repo contains simple code to reproduce your problem
  3. English first in community I think, so that other people can help you too