I am working in an application where I would like to combine a code that I have developed in Android with Flutter.
More specifically, I have a login in Android where I would like to send me to the main that I have in Flutter.
I would like to know if I can pass from an Android activity to Flutter as I normally do in Android with the manifest.
Does anyone know if this is possible?
Yes, you can.
You can use a Platform View to achieve what you want, in this particular scenario, an AndroidView widget. It’s more or less like a platform plugin, but this time, you’re actually inlining native views in your widget tree.
It’s not immediate and there are a few things that you need to setup before achieving it, so you should only do so if your activity is too complex to the point where it’s not worth to recreate and maintain with Flutter widgets.
Nevertheless, I’ll leave you with an article that goes through the process of creating the Android Platform View itself.
Related
I want to make home calendar widget using flutter, is there any example of way to make it???
A good place to start, either by using them or by getting inspired by their methods, is to look for appropriate packages on pub.dev
A quick search yields me:
https://pub.dev/packages/calendar_view
https://pub.dev/packages/table_calendar
https://pub.dev/packages/cr_calendar
Among many others. You can use those and customize them to fit your needs. If you want to implement something yourself, you can try using a package like flutter_grid_button:
https://pub.dev/packages/flutter_grid_button
Edit
I see you meant to make it an actual Widget (in the traditional Android/iOS sense, not in the Flutter sense). For that, you can use something like the home_widget package:
https://pub.dev/packages/home_widget
But you'll need to write the Widget code itself in native iOS/Android code, and cannot use Flutter views as-is, as I understand.
Let's consider this use case:
I have an already developed app in android and iOS which is out here for a while. I would like to implement a library/package in Flutter that could run on Android and iOS projects. Let's say I want to store some data in the flutter part, trigger some events, and so on. I might not want to show any screen from flutter just a logic part would be here. Is it currently possible to do something like that? Just to reduce the effort to implement it natively in iOS and Android
I have a UWP application and I want it to be able to run into Android and also IOS using Xamarin.forms. Is there anyway to port it and run it on both of them?
Short answer: no.
Long answer: Xamarin Forms is "Xaml" too, but works on top of a completly different framework.
If you have used a good architecture, you can use all your viewmodels (or whatever your ui logic is called) and just put a Xamarin.Forms UI on top of that. With a little luck, you can reuse a lot of the structure from your existing xaml, but as most names are different, it is almost a complete rewrite. Or you could put a native UI with Xamarin.Plattform UI on top of your code.
So if you want to go cross platt form, you have to add at least one completely new UI.
I'm programming an app in Android.
My client needs a 'dummy' like application, I mean, an app with all layouts but just navigable, without the actual controllers or activities, just navigate through layouts. By clicking buttons, but just pass to the other layouts without executing java or whatever code.
My question is, is this possible in AndroidStudio?
Or should I generate another kind of graphical app in order to accomplish this?
Any ideas?
Thanks in advance!
The short answer to your question (as I understood it) is no. You have to have activities to have an android app that will function. You could create a very rudimentary set of activities to do what you want.
However, if you are simply trying to create a mockup of what the app will look like for your client, I suggest using a tool like FluidUI. This will allow you to layout the general look and feel of your app without any actual code required.
Let me know if this helps!
Alright so I have an app that I would like to have utilize other apps. For example I have an app that does quite a number of things except for a directory look up since there is already an app that does that for my school. I know I can launch the application with intents, but that also brings them away from the navigation menu for my application. Is there anyway that I could run an app inside a view layout. I am not hopeful for this but I figured I would chance asking it anyway.
This is technically possible by using widgets. You can implement an AppWidgetHost, and other applications can create App Widgets to use inside your own app. This is how the launcher screen in Android works.
This, of course, will only work if other applications in question implement widgets. So, the general answer to your question would be no, it is not possible to host arbitrary applications or Views/Activities from other applications inside your own.
This not the Android design philosophy. You should send an Intent to the directory app, which I hope is designed to look up a result and then return it to you. The mechanism is startActivityForResult() in your app, and setResult() in the directory app.