Add Flutter screens to existing native iOS and Android apps - android

I have a product natively developed in iOS and Android platforms. And they are released onto AppStore and PlayStores.
Our Product Teams wants to add extra features.
How can I develop these new modules, screens in Flutter, Dart and add these to the existing iOS and Android native projects?
The problem is... one of the Flutter screens have to appear as one of the VCs in TabViewController.
The Flutter pages mentions launching the flutter modules on tap of a button.

You can refer the official Flutter docs here for adding flutter to the existing app also follow along with the article which I thought might be useful

Related

Dynamic Feature Module with Flutter

I am a Native Android Developer and I was learning Dynamic Feature Module from here
But I also work with flutter. So, is this feature available in flutter?
It is not but flutter now has ability to add flutter to existing android app which you can use for that case, I.e build all submodule in flutter and add or load them in a native app, I hope you got an idea.
Looks like work is being done to support Dyanmic Features in Flutter in the future.
https://github.com/flutter/flutter/commit/a76bb1a08e3d22ea73a5f8005e6e46925ee938c3
As of this time, support for Dynamic Features has not been announced.
"UPDATE" - Flutter's Deffered-Components is meant for dynamic feature modules. It build apps that can download additional Dart code and assets at runtime.
OLD Reply - Flutter supports Android App Bundles too (just like for Android App using Java/Kotlin) as mentioned here and this Pull request. App bundles allows Dynamic feature module support, hope this helps.
Maybe if a flutter functionality could be wrapped in a dynamic feature module. https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps

Integrate flutter package in existing Android/iOS app

I am trying to incrementally migrate two existing mobile apps (Android and iOS) to Flutter. The incremental migration is required because these apps have a huge codebase.
Since the two apps have the same business requirements (they need to do the same things) I want to start unifying the business logic (and maybe the repository logic) to flutter first (not the UI).
I have seen that it is possible to create a flutter plugin, which let you create an API in flutter, implemented with native code in Android and iOS. The communication between flutter and native code is permitted using "platform channels" (https://flutter.io/platform-channels/).
My question is: It is possible to use the same thing in reverse? Writing the API in Android/iOS code, integrate flutter as a gradle module/CocoaPods pod and use "platform channels" for communication?

Is it possible to embed a Unity game into a Flutter app?

I am creating an app that will require small mini-games as a menu option, and I have created these games in Unity. Ideally, I would like to embed these games into a Flutter project. I have seen tutorials on doing this with Java and Android Studio, and I need to make a decision on which platform I will be using for my internship project. I have several questions about the SDK, but I have posted them separately to keep the answers distinct (and help filter out the noise for anyone searching for these specific answers), and this is one of my main questions.
Specifically, I am following this guide: https://medium.com/#davidbeloosesky/embedded-unity-within-android-app-7061f4f473a
for Android Studio, and was wondering if something similar was possible with Flutter. I am also using Android Studio as my IDE for Flutter, but need to decide if I should stick with Java, or switch to Dart and Flutter (which actually works much better for specific UI elements I need).
If not, is there another way to package a Unity project and a Flutter application together?
You can imagine the whole Flutter app to be rendered on one view of the final native application. It can coexist with native views. So it should definitely be possible to display a native Android/iOS view with Unity content and trigger that from Flutter.
Create a Flutter project and open the Android native part of it (right click the android folder in Android Studio, choose Flutter -> Open Android module).
Create a native Android view there and use platform channels to display it.
Add Unity content to the native view.
https://flutter.io/platform-channels/
As of May 2022, I would like to share an updated information for mobile app developers who are researching this interesting issue. The reason I'm writing this answer is because there was so many development tasks that need to be done before I get the right answer to the above question. A developer researching this subject should work in both Unity, Android Studio and Xcode in order to find a definitive answer to his/her question, and should also know how to develop mobile apps with Flutter. Honestly, if everything had not gone well, my long time development works might have been wasted. In addition to my answer, I would like to give also positive news on the side of Augmented Reality developers who are using Vuforia and investigating the same issue.
Using the magnificent https://github.com/juicycleff/flutter-unity-view-widget repo; in your mobile app developed with Flutter, you can run the game you developed with Unity or the AR app you developed with Unity + Vuforia. You can use the app you developed with Unity, in the Flutter App you developed. They can also communicate each other in the Flutter App. You can pass parameters from your Flutter App to your Unity application in the Flutter App, and you can also pass parameters from your Unity application to the Flutter App. This means, you can pass parameters from your Flutter App's Dart code to the C# code of your Unity work and vice versa. For those who develop AR Apps with Vuforia, I would like to point out that for the scenario I am working on, I use Image Targets. I have same experience on the phone, with the Unity APK and Android Studio APK, they are in the same stability. Of course APK sizes are different, Flutter App APK size is of course bigger than Unity APK, but in my case this is absolutely ok.
As of May 2022, the answer to the above question is: Yes, you can. Moreover, for those who develop AR Apps in Unity using Vuforia, the answer is also: Yes, you can. I wish success to everyone who will start working in this scenario. Since it is a detailed subject, some difficulties are waiting for you on the way, but if you can see that the product you dream to achieve will be a stable Flutter App, with all the nice features, I am sure that you will find the enough motivation to bring all of them together. Good luck.

Make compatible a android application to ios also

I have developed a project on android but now I want to make it compatible for ios also. How a project could run on two operating system?
I would suggest doing some research on cross-platform development such as https://xamarin.com/.
You should be able to use the general logic behind your android app to develop the code using xamarin.
Android and iOs are totally different platforms so basically you cant just run an Android app on iOs. But you can try using cross-platform tools like Xamarin to publish your app in several different platforms. For example in Xamarin you write your app with C# and publish it on iOs and Android at the same time.
There are different flavors you can use to develop on both platforms. It all depends on your skills and preferences, or whether you want to learn something new. The most popular languages are the following:
Xamarin - Used mostly as a plugin with Visual Studio, and based on the C# programming language.
Cordova - An Apache language which lets you develop for both platforms.
Phonegap - the Adobe flavor of Cordova.
Sencha - If you are more into JavaScript, you can use this flavor to develop apps for both IOS and Android.
Kindly note that all of the above are subject to subscription and payment, although flavors like Sencha come with a free version too.
Hope this helps.

Is it possible to embed Phonegap within Native app?

We are building a new proof of concept application which will utilise the device's camera, and I was wondering if we built this using phonegap, could we then integrate this into existing native apps ?
i.e. can you build phonegap screens, and then interact with native UI screens in Android and IOS
many thanks
Add to your native
New Cordova-based applications created using the Xcode template provided in Cordova 1.4 or greater use Cleaver, and this template is considered the reference implementation for Cleaver.
also please follow : http://devgirl.org/2012/11/15/embed-cordovaphonegap-in-your-native-ios-app/

Categories

Resources