Dynamically alter App Icon on iOS and Android - android

I'm fairly new to Flutter but have found that it fits most of my design needs for iOS and Android. But, I've been unable to find a way to dynamically change the app icon.
In Swift, you were able to change the app icon from inside the actual app allowing for some pretty neat customization. A Medium article discussed this back when it first came out for iOS 10.3.
Does anybody know of any way to do this in Flutter, or will I need to make a custom package to do this?

https://medium.com/flutter-community/programatically-change-ios-app-icon-in-flutter-c9e84bc541a2
Maybe this would help. Here's a plugin too.
https://pub.dev/packages/flutter_dynamic_icon

I don't believe this is currently supported, and probably won't be by the flutter team although someone could theoretically write a plugin to do it. However, most of the configuration needs to be done natively anyways, so I don't know how much value the plugin would provide other than doing the call to setAlternateIconName.
What you should do is write the code directly in iOS as you would for a native iOS app, but expose a MethodChannel to the dart side which would allow you to control it from flutter.

Related

Flutter - Make Phone Call without UrlLauncher

I'm building an application using flutter and I want to be able to integrate with the phone to make calls.
In android I believe I'd ask for the REQUEST_PHONE_CALL permission.
Using flutter, I found the this plugin. Unfortunately it doesn't support iOS and the android implementation is still rather buggy.
The only alternative I found to achieve this is to use this, but that doesn't quite have the same functionality, so I want to find other alternatives.
Any tips? Thanks in advance!
I think the best way is to write it in the native code. I mean the code to call a number using platform channels
[https://flutter.io/platform-channels/][1]
I didn't test this and didn't try it. when I do I will update my answer :)

Is it possible to develop mobile keyboard app in flutter

We want to develop mobile keyboard app - (Third party keyboard) that have some unique features (such translate on the keyboard).
We would like to know if there is a way to developed it once both for IOS and Android, with Flutter, or any other solution?
There's a long and a short answer to this. The short answer is basically no, it's not feasible at this time to do this.
The long answer is that it may be somewhat possible but with a fairly large amount of work for you to do. You're going to have to first create and appropriate project type in android and ios, and then import the dart code & set up the build. You may be able to start with a normal flutter application and modify the xcode/gradle builds to match the specifics for ios/android, but I'd guess that's somewhat unlikely. So you'll probably still have to maintain two separate projects, but which could import the same dart library for the UI.
Because Android and iOS use different APIs for their keyboards, you're going to need to write a Platform Plugin or at least method channels which communicate between your app and the native code, for each of iOS and Android. You'll also probably have to embed the flutter view yourself - see this example as I'd bet the normal FlutterApplication etc won't apply.
I'd guess that on android you could probably get this to work eventually with a lot of work (depending on how familiar you are with android, platform channels, and integrating libraries such as flutter's into the build); on iOS you might have luck but it's somewhat conceivable that iOS blocks certain features that flutter needs in the keyboard for performance or security reasons - just guessing from my experiences developing apps in native iOS although I haven't done a keyboard specifically.
That being said, if you do try this I'd be interested to hear the results, and if you were to go about it in a somewhat generic way that could be re-used it would be of great benefit to the flutter community!

Is it possible to build android widgets in flutter?

The fact that Flutter heavily uses the word widget makes it difficult to find documentation on this topic.
On Android (I believe this isn't possible on iOS), we can add widgets on our home dashboard, allowing us to see app-related information or to trigger one-click actions without needing to open the app in question.
Is it possible to build such "widgets" in Dart & Flutter? Or should I do that in java and somehow plug it with my flutter app?
Can you share an example of a resource containing one?
EDIT: I have no android development experience, but it sounds like using a drawable canvas might do the trick.
I could find some canvas flutter code, but I can't connect the dots yet.
EDIT 2: From this Github issue, it looks like writing android home widgets in flutter is a no go since Flutter has its own rendering engine. I'm keen on learning kotlin to get this done, but if someone knew of nice tutorials to help me with that, that would be immensely helpful.
As the OP mentioned in an edit, this isn't currently possible because Flutter uses a custom rendering engine.
Widgets are quite limited in what they can render; the documentation explains that only certain layouts may be used. You could theoretically use Flutter's software renderer to render to an image in a seperate instance from the main one and display that, but that would be very technical, likely not very performant, and not straightforward at all!
Here is a quite detailed tutorial for widgets that guides you through creating a few examples although in Java. The same logic applies with just a few syntactical changes for Kotlin as the classes are pretty much interchangeable. However, realistically, most of the work is in the layout with some wiring in android; if you're already familiar with Android & Java, keep in mind that Kotlin does add a bit to your app size (The Kotlin runtime adds about 7,000 methods and ~1MB to your debug APK from the kotlin on android FAQ) and since most of your logic should be in flutter you probably won't have all that much Kotlin/Java code if this is all you're using it for (although if you're new to both Java & Kotlin, Kotlin is arguably more friendly in some ways).
Also, to be able to communicate between your flutter app and the java/kotlin backend, you'll need to use platform channels as described in the flutter documentation.

Making a App for tablets with certain requirements

I need to create a app that will run across Android and IOS, although i would like to avoid the native languages of both and only use JS/HTML/CSS, after digging a lot online i think that the solution would be to use Phonegap and Ionic Framework
The app is not complicated i just have to create simple drag and drop games that the user can review at any point and make changes to them.
The whole point is for a medic to create profiles for the patients and be able to consult them at any time.
Now my question is simple: will this do enough? or should i look into anything else?
Phonegap or Cordova are good solutions for you, then you have to build your UI with HTML. For drag & drop you could use jQueryUI
In my opinion, you have to go through with the PhoneGap/Cordova plugins
also, and go through with the which IDE is used for Development the Application like Xamarin,NetBeans etc.

How to write android code in titanium

I had been working on android since a little long. Now I am wondering about titanium. Is it possible to write android (java) code in titanium app since the app is build in titanium? If yes then how? Actually I am having problem dealing with push notification for android in titanium. So I got a solution to build complete app in titanium and then if possible use android code in app to deal with push notification. How? Please do response as quickly as possible. Thanks in advance.
To answer your question directly, you will need to develop a native Android extension to call Java code via JavaScript in a Titanium application.
Rai
You should be checking out the docs Here tells you all you need to know
Hope it helps
Frank
yes it is possible but remember that the titanium tools lag behind the official android ones. Documentation is poor and often wrong, code is laggy and the resulting .apk are much bigger.
Why are you thinking of using Titanium? For cross-compatibility?
If you are thinking about that you have multiple possible ways:
1) Build a minimum common denominator, like titanium, but better: Write a core application for both android and iPhone so that it will be fast and light on memory, with a modified broswer to show your content. This way the interfaces will be much easier and you'll have to write the content just once.
Still you will be able to access low level hardware, like GPS, compass, gyroscope.... easily without consuming too much battery (unlike with titanium) as needed.
2) Find an existing minimum common denominator: Javascript work both on iPhone and Android.
3) There are many other options (Adobe air, python, custom scripting, mobile web site, ...) but I think that the cons outweigh greatly the pros.

Categories

Resources