bostrot / flutter_android_pip Goto Github PK
View Code? Open in Web Editor NEWSimple Flutter plugin for Android picture in picture mode.
License: MIT License
Simple Flutter plugin for Android picture in picture mode.
License: MIT License
i can't running project Flutter when using this libs, are you can support?
Any updates on iOS compatibility ?
does it work outside of the app?
like the netflix pip?
this plugin is invalid!
$ flutter doctor -v
[✓] Flutter (Channel dev, v0.8.0, on Mac OS X 10.13.1 17B1003, locale zh-Hans-CN)
• Flutter version 0.8.0 at /Library/Java/flutter
• Framework revision a74f591d0c (4 weeks ago), 2018-09-04 17:12:24 +0100
• Engine revision de4c7a53f2
• Dart version 2.1.0-dev.3.0.flutter-760a9690c2
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /Library/Java/android-sdk-macosx
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 27.0.3
• ANDROID_HOME = /Library/Java/android-sdk-macosx
• Java binary at: /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/bin/java
• Java version Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.2, Build version 9C40b
• ios-deploy 2.0.0
• CocoaPods version 1.5.3
[✗] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
[✓] IntelliJ IDEA Ultimate Edition (version 2018.2.4)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 27.0.3
• Dart plugin version 182.3569.4
[✓] Connected devices (4 available)
• M10 • 0123456789ABCDEF • android-arm • Android 7.0 (API 19)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)
• iPhone • c3126f0d53ffc64126eede537bbb35c4d005c2ce • ios • iOS 12.1
• iPhone X • 5566700A-FF74-438C-962E-D203F68924C3 • ios • iOS 11.2 (simulator)
! Doctor found issues in 1 category.
Execution failed for task ':flutter_android_pip:verifyReleaseResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\Users\52963.gradle\caches\transforms-2\files-2.1\9be693d6de0134bc43131385f62648d4\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\52963\.gradle\caches\transforms-2\files-2.1\9be693d6de0134bc43131385f62648d4\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcIndex not found.
can you solve this?
as the title described
May add more activities for a helpful example.
I am using flutter_android_pip in my Flutter app to enter PiP mode instead of minimizing the app (when user presses home).
It worked fine with code like this:
class _MyWidgetState extends State<MyWidget> with WidgetsBindingObserver {
...
void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.inactive) {
_enterPipMode();
}
else if (state == AppLifecycleState.resumed) {
_exitPipMode();
}
}
...
}
After I have installed Firebase it stopped working with following error:
Failed to handle method call
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Activity.enterPictureInPictureMode()' on a null object reference
at com.bostrot.flutterandroidpip.FlutterAndroidPipPlugin.onMethodCall(FlutterAndroidPipPlugin.java:26)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Note, it still works if Firebase is not initialized in the code.
Also noted deprecation warning on both plugins:
Note: /.../firebase_core-0.7.0/android/src/main/java/io/flutter/plugins/firebase/core/FlutterFirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /.../firebase_messaging-8.0.0-dev.15/android/src/main/java/io/flutter/plugins/firebase/messaging/FlutterFirebaseMessagingPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /.../flutter_android_pip-0.0.2/android/src/main/java/com/bostrot/flutterandroidpip/FlutterAndroidPipPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Are these plugins incompatible in some way?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.