We are building an application in Flutter, which is composed of an SDK (no UI Code) and a Flutter UI, using the SDK.We have now the requirement to provide the SDK for other, native target platforms (iOS, Android, Web, JVM) and use it in existing applications. As far as we have understood this is possible for iOS and Android. But is this also possible (or planned) for Web and JVM? We simply want to minimise the effort to build the similar SDK in various platform specific technologies.
Thank you!
You can build your Flutter app targeting web https://docs.flutter.dev/development/platform-integration/web/faq#is-the-web-version-of-flutter-ready-for-production
If you want to target the Desktop then check https://docs.flutter.dev/development/platform-integration/desktop to see if it meets your requirements.
Related
Can I use one Flutter project to create web and mobile applications? if yes, How will I go about it, since some libraries that work with mobile might not work with the web? And how can I build a project such that the web pages do not fall into the production mobile app.
You can choose to limit your project to only the web platform or the mobile platform when building the project. Also, you can choose not to use any external library in your project.
If you want to check the platform that your app is run you can use the class Platform.
But be careful this class can be problematic for web so you should you kisweb
if (kisweb) {
// you're on web
}
Yes, you can but the question is should you? as flutter is now capable to support multiple platforms with a single code base. but the problem arises when you have to implement some complex functionalities into it and there are few packages that support all platforms that you want to deploy. So to tackle this either you have to ditch the idea to implement those functionalities or write your own package.
Capacitor allows us to code once then generate web, Android and iOS applications. Most people using Capacitor will generate native Android and iOS applications.
But strange enough, I can't find any documentation about how to create automated-tests for the two native applications. I can easily test the web application using protractor, jasmine or whatever. But when it comes to native apps, I can't hardly rely on native tooling (Android Studio and XCode) as there are other issues preventing me from testing it easily (ex: no possibility to set Accessibility ID through the views markup, etc).
Where are we at with Capacitor native apps automated-tests ?
I believe this is what you are looking for Ionic/capacitor Integrations for Testing
As far as the community/forums and official docs go there are only 3 ways you can test your apks
Native [Andriod Studio / Xcode] [Emulated versions]
Real Devices
3rd party Integration listed in the link above..
Even on google there very less info on this topic.. most of the blogs/ articles only say that Ionic/Capacitors can be tested just like a normal WEB App
When an external component such as a Camera or File picker is needed, the Flutter for Android Developers documentation (currently in the works) states that we would have to build a native platform integration.
I currently have a device that has a built-in barcode reader with a manufacturer-provided Android API. So, for that I would need to pursue this native platform integration method - or even for playing videos or using the camera for that matter I would think.
Is there an example repo that demonstrates how a well-integrated app should be? ..a project that integrated ExoPlayer for example?
You can use platform channels to call native APIs that aren't exposed by the Flutter platform.
There is an example in the Writing custom platform-specific code docs:
The full, runnable source-code for this example is available in /examples/platform_channel/ for Android with Java and iOS with Objective-C.
If you want to make your code reusable by others, you can publish it as a package, but this is optional. There is a repo of plugins maintained by the Flutter team that you can use for inspiration.
Flutter makes it pretty simple to use platform features/native SDKs within a flutter application. However, does anyone know if the opposite is possible?
What I'd love to do is create an SDK in dart/flutter that can be used by mobile developers on their preferred platform.
I am not much clear with the "Cross Platform Apps." Can we really built up some apps which can run on iPhone/iPad , Android Phones/Tabs , Blackberry , Nokia (Any platform or more than one platform at least) ?
I have heard something like WAC , Titanium but really not clear with all these. Please help me out.
There are some good frameworks out there to build cross-platform mobile applications:
Titanium: It is a framework to build Android, IPhone (and BlackBerry, still in beta it seems) using javascript, that will compile to native applications for the platforms specified.
Rhodes: A ruby framework, that supports almost all the mobile platforms out there (recently they added support to WP7). It has an MVC structure, and can use RhoSync to synchronize the data to a server side application.
PhoneGap: Another javascript framework, but it supports more platforms than Titanium, because it doesn't compile to native applications, but it embeds a web application inside a native application (web apps/web views are supported in each platform, so it's easier to handle the portability this way).
The apps will have access to the hardware, like the camera/gps, through some generic apis.
In some case you can build specific native module to integrate them in just one application platform if you need to.
These frameworks are useful to build cross-platform application writing just one application, without having to write each single application with the platforms sdks.
They have some (or many) limitations. If your application are simple enough you can consider using one of those framework. But for more complex ones, sometimes, if you target only a couple of plaforms, it could take less time to build each one with native sdks individually than using one of this cross-platform framework, because of their limitations (I highly prefer using the Android SDK than using Titanium).