Integrate flutter package in existing Android/iOS app - android

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?

Related

How to create separate user's and developer's app versions in Flutter?

How to create several versions of a Flutter app: a usual version and a development testing function differing that the development testing version has unlimited credits (credits are an in-app product)?
In C++ there are #if/#endif, what can I do like this in Flutter?
I use Android Studio.
I need to do this reliably, not to accidentally release developer's version to usual users. How to protect securely against such a case (releasing developer's version to usual users), against an incidental error?
Currently, I need this only for Android, not iOS.

Should I have the web version of an app in the same Flutter project for android and iOS, even though the web version is 100% different?

I have a Flutter app running on both android and iOS (Flutter + Firebase) but I'm implementing an admin dashboard that will only work on the web version. I was thinking about developing the dashboard with python + react but since it is a pretty simple interface, I've decided to develop it in Flutter web.
My question is: Should I have the admin dashboard be a separate Flutter project or should I keep it all on the same code base?
It always depends, but since the admin interface seems to be completely independent from the rest and does not share code with the mobile application, I would make a second (Flutter) project out of it.
If your admin interface depends heavily on tables, maybe use something different than Flutter. The material tables which come with Flutter are rather limited at the moment.
On the Firebase side, it all depends on what data the apps needs to access.
If your iOS/Android and admin apps all need to access the same user list, database, or any other data in Firebase, they need to be in the same Firebase project.
If the apps access separate data sets, they should be in separate Firebase projects too.
On the Flutter side, for me, it depends on the number of icons, binaries or installations.
If any user (including yourself) can only have a single app installed, and it switches mode based on for example sign-in credentials, then I'd make it a single app.
If even a single user can have multiple of the apps installed, I'd make them separate apps.

how to integrate Kotlin Multiplatform Mobile with Amazon amplify services?

I am raising this to just get inputs from community if there is any lib which I can use for integrating Amazon's amplify services in KMM? Also I have searched but there is no specific SDK or lib for KMM as of now.
So any input would be helpful on this.
The Amplify team is currently investing in Flutter as a multi-platform offering. Support for Flutter had been one of our top feature requests. Amplify Flutter became generally available as of February 15th, 2021. Amplify Flutter currently supports iOS & Android. Customers have additionally expressed interest for Flutter on the Web and on the Desktop.
We don't currently have any plans to support Kotlin Multiplatform (or Multiplatform Mobile.) That said, we are an open source project, and love to see community contributions. You could build something on your own.
To do so, I'd start by defining a Kotlin-language API surface for the library. You can probably use the Kotlin-language facade for the Android library as a starting point. From there, you can add platform bindings to Amplify Android, iOS, and JavaScript.
As a final note: the Amplify products are intended as a front-end framework. Therefore, it's unlikely that we we'll ever prioritize a full multi-platform build. But if we see enough customer demand, we could potentially add more explicit support for Multiplatform Mobile.
Source: I am an engineer on the Amplify team.

Is it possible to integrate native libraries/ Mobile SDKs with Flutter?

I am developing a Flutter application and I need to implement a Payment SDK which is available in my country. They have Android SDK and iOS SDK, then Javascript, etc SDKs, but not Flutter.
My question is, is it possible for us to implement native SDKs in Flutter? In this case, I will have to integrate both Android and iOS SDKs. Is this is supported, then How can I do this?
You will have to create a platform channel that will call a method that passes the handling to the native side. On the native side, you can use your PaymentSDK specific code. This way you will be able to use native code from SDK depending upon your platform but your flutter code base won't have to worry about platform, at it will be calling the same platform channel method.
Check out here:
https://flutter.dev/docs/development/platform-integration/platform-channels

Combining React-Native for Android with existing android codebase?

I have a huge android codebase for an app : It's basically a SDK where all the business logic is implemented.
I have a basic native UI. I want a way to quickly iterate on the UI : that's why I thought about React-Native for Android.
Do you think the interop will be easy or is it difficult to integrate it with an existing codebase ? anybody has had an experience with that ?
The only way react-native UI can interact your SDK code is if you expose your SDK's API by building a NativeModule (https://facebook.github.io/react-native/docs/native-modules-android.html#content). Building NativeModules can be from anything very simple to large depending on your SDK.

Categories

Resources