flutter_android_bridge 0.4.0 copy "flutter_android_bridge: ^0.4.0" to clipboard
flutter_android_bridge: ^0.4.0 copied to clipboard

Flutter Android Bridge is a Flutter package that provides a bridge to interact with Android's native functionalities. This package allows Flutter applications to communicate with Android's package man [...]

0.4.0 #

  • Added FlutterAndroidShell.execStream, for a shell command that is meant not to exit — a /proc sampling loop, a logcat follow, a dumpsys watch. exec cannot express those: it buffers the whole output and only returns once the process has ended.
  • New ShellStreamHandle (lines, done, stop(), isRunning, pid), the same long-running-process shape as ScreenMirrorHandle. lines is single-subscription and nothing is read from the process until someone listens, so a late subscriber loses no output; \n, \r\n and a lone \r are all treated as line terminators.
  • ShellStreamResult explains how a session ended (reason, exit code, lines emitted, and the stderr tail). The tail is capped: a command that reports one vanished pid per second would otherwise accumulate stderr for the whole life of the session, so only the last 50 lines are kept and stderrLineCount carries the real total.
  • execStream runs adb with runInShell: false: a shell script is one argument to adb shell, and the host shell would re-split it on spaces.

0.3.1 #

  • screenMirrorToTcp: closing the mirror now drops the player connection too. Closing the server socket alone left the accepted socket open, so a player still waiting for its first byte (which is what happens when screenrecord fails to start its encoder) hung forever instead of seeing the stream end.
  • ScreenMirrorHandle.done reports how a session ended through the new ScreenMirrorResult (reason, bytes streamed, and the adb/screenrecord stderr), so a session that never produced video can explain itself.
  • Example: the mirror keeps the device aspect ratio. The player was sized by width alone, so a portrait stream was squashed to fit the available height, and the --size presets asked a portrait device for landscape frames — screenrecord letterboxes to preserve the display ratio, which spent most of the frame (and the bitrate) on black bars. Sizes are now scales of the device's own resolution, read from wm size on connect.

0.3.0 #

  • Added support for live screen mirroring (see example)

0.2.4 #

  • Added suppot for exec-out
  • Minor fixes

0.2.3 #

  • Dependencies update

0.2.2 #

  • Using isolate pool for the scanner

0.2.1 #

  • Toggle debug for tcp scanner

0.2.0 #

  • Enable debugPrint per command

0.1.0 #

  • Added adb logcat command
  • Added adb shell am broadcast command

0.0.9 #

Added more methods

0.0.8 #

isConnected should not throw

0.0.7 #

adb path must be specified

0.0.6 #

Removed FlutterAndroidBridge.debug

0.0.5 #

Added connection timeout Added tcp/scanner

0.0.4 #

Fixed root/unroot arguments

0.0.3 #

Minor changes Updated Readme

0.0.2 #

Added more shell methods

0.0.1 #

Initial release

1
likes
140
points
294
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter Android Bridge is a Flutter package that provides a bridge to interact with Android's native functionalities. This package allows Flutter applications to communicate with Android's package manager, intents, and other native features through a simple and intuitive API

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

copy_with_extension, flutter, intl, isolate_pool_2, meta, properties

More

Packages that depend on flutter_android_bridge