I'm experimenting with Ryan Heise's great audio packages in Flutter.
I import the Just Audio Background ("JAB") code from GitHub into Android Studio, and I run flutter pub get where necessary to get rid of any errors in the packages.
I want to replicate the simple radio player in the file example_radio.dart in the Just Audio package. But I need it to run in the background.
Following the setup instructions on the JAB pub.dev page, I make sure the dependencies are correct in pubspec.yaml and I edit the Android Manifest file.
I see some unresolved classes and packages in the Manifest (see screenshot); however, the app runs. But I am not sure about this. I'm new to Flutter and am not sure how important it is to have zero errors in the Android files, because I have seen other SO comments saying to just ignore them. This I must investigate.
When I run the app, everything works fine except the audio stops when it goes into the background.
I also ran the JAB example file, and this works fine, continues to play in the background. I have tried to edit this file so that it plays just the radio stream and shows the simple metadata. I've got it running, but the UI's a mess with my naive editing.
Any pointers, advice, much appreciated.
Thanks.
Related
I'm considering building my app with Flutter because of the attractive cross-compilation features, native feel, and speed of development.
I need to use an advanced audio processing library to be able to make my app, so the options I was considering are either to use JUCE through CocoaPods (a C++ audio library) or AudioKit (a Swift audio library) with Flutter.
I think JUCE is definitely possible to use with Flutter as I've seen two github projects which seemed to implement it (https://github.com/audiooffler/JucyFluttering and https://github.com/tomduncalf/juce-flutter-integration). I haven't been able to get it running on my own setup though, the build succeeds but when I use the first link (JucyFluttering) but I get an error as follows: https://justpaste.it/9c8xe. I've tried to look into it for a while and couldn't figure out what is going wrong. If anyone has an idea or approach to move from here
The other option I was considering is building an iOS only app for my prototype using Flutter and AudioKit (Swift-based), and then reusing the Flutter UI code with JUCE when I want to move to cross-platform. However, I'm totally clueless on how to go about bringing AudioKit into my Flutter project. The library is not on pub.dev so including it in my pubspec.yaml file, I get the following: "Because audiokit_flutter depends on audiokit any which doesn't exist (could not find package audiokit at https://pub.dartlang.org), version solving failed." when I try to run "flutter pub get".
I'm not even sure if the AudioKit approach is viable, but if anyone has any relevant knowledge, please share it with me! I've been trying to figure this out for weeks and it has been very frustrating! I would very very much appreciate the help.
Thank you so much!
To be more precise, I already have a huge app writen in Ionic and now we're considering to migrate it to flutter, but we can't rewrite it from scratch, both ionic and flutter should coexist.
So my question is: can I have a flutter app as a "host" and import / run the ionic app inside it? Something like a micro frontend.
Until now I was able to build the target ionic app and import it on the flutter app, under android folder, but it does not feels like a productive way to approach the problem.
I also googled a little bit about this integration, but did not find anything that solves this problem.
I appreciate any help on this topic.
Yes, it is possible, but very cumbersome.
I did it for a project and embedded 3 ionic apps inside flutter.
I'll not list every problem that i faced but just go through some points to give you an idea.
You will need to take care of some cordova plugins that use native code, for Android copy and paste some folders like CordovaLib,cordova and use it as a library. For iOS you must add the plugin files like *.h to the compiles list inside Xcode and create an Pod to get the cordova resources (that's the way i did)
To "launch" the app for android you need to start the cordova activity and for iOS you need to play with UINavigationController and FlutterViewController, and of course create a method channel to be possible to call it from Flutter.
For multiple apps, you have to mess inside de cordova code to get the app from the right www folder and be sure to equalize every plugin version between apps.
Some packages from flutter may clash with ionic/cordova libs
Every change you do to your ionic application it must be tested outside flutter and within it to see if there's any mismatch behavior that you didn't expect, specially when adding new plugins.
Maybe some permission issues will arrive between applications like camera or localization.
I know thats not the answer, but when searching on how to do it, i stumbled upon this question a few months ago and it still without any answer on this problem.
But my final take is that the effort of joining together all pieces using multiple languages and frameworks together with the job of maintaining this spaghetti behemoth is not worth it and you'll save yourself of a tremendous headache.
I made an app for android with unity3d, and want to include chartboost into it. I imported the plugin for unity, and added an app as well as a campaign on chartboost. I also made sure that the signature and app name were put into the strings.xml file. When I tried running the demo scene, the buttons appeared, but when I tried to click them, nothing happens, not even a message in the console. What am I doing wrong?
Thanks for the help in advance!
Lagidigu
As far as I know, chartboost does not work in the editor. You will need to build to a device and use logcat to see the log messages. However their unity plugin seems to be in need of some fixing- in the meantime, email them at support#chartboost.com and they should send you a workaround .jar file that will get the ads showing in the demo.
See my answer to This Question for details about why the ads aren't showing up using the newest Chartboost unity plugin.
I think their plugin is broken because my other apps DO show ads, and i did nothing different except using their latest plugin, which also for me does not work.
I'm trying to compile the Mobile VLC project but it always fails with the buildMobileVLC.sh script. Several different issues occur.
Can someone post instructions on how to build the MobileVLC project so that it runs properly on a device?
Thank you,
apptunes
Please see the following thread, and specifically this answer.
I will not paste the answer here as it's redundant, but if you follow the steps you'll get VLC to compile for iOS. The one thing that I am still having trouble with is being able to visualize multicast rdp/udp streams. HTTP stuff works fine, e.g. 3gp files etc... And of course standard files uploaded via iTunes work without a problem.
I have successfully downloaded the source code for the AOSP Native Music Player and plan on building my own custom music player off of this basic build (I'm assuming this is legal because the code is open source). The problem I have is that even with minor code change and renaming the package, the emulator still seems to think that my app and the android Music app are the same. When I click run, eclipse installs but does not start my app. When I click Music in the app drawer it asks me which package I want to use (My package causes a force close). Does anyone know what's going wrong and how to make it so that I can run my app as a separate app? If it helps, logcat is reading "Unable to Instantiate Activity ComponentInfo on the first line of the stack trace.