Is it possible to have dynamic App icon in Android? For example let's say I have clock App. Can I update the App icon showing current time or is the only way to implement a widgets?
You may use <activity-alias> to display different app icons in the launcher, just like the example I created here
But I don't think it is a good decision to update the app icon per minute, the solution may only applicable to calendar app.
Related
Dynamic App Icon In Flutter
I am expecting for a way to make a similar ui,Put it in the app icon.
want to create the live app icon continuously changing itself, like apple clock app icon shows the current time in the App Icon.
Is There is any way to make that type of App icon in flutter
Similar App Icon like this
I came to ask for help because I want to do a native splash screen type in my flutter application. So I want that when I launch my application, I have a page with the logo of my application, a descriptive text, the version number of the application and a loader.
After a lot of research I cannot find satisfactory tutorials. Either there are native splash screens that change the base color when the app is launched and we can just display a logo. Either we create a fake splash screen which is a start page but which is launched after the native start. I don't know if I'm clear ... Voila, but how can we all do it at the same time?
I'm just trying to develop first-screen contents application which acts like...
If you unlock your smartphone, this application show up and show its contents like today's whether, a sentence of bible, etc.. before smartphone's own contents. And then if you touch the screen one more time, you can use your smartphone.
So it seems like.. a splash screen of smartphone, instead an application.
Because I'm not good at English, I don't know how to call this technique by English.
So what I want to know is anything. The name of this technique.. helpful flutter widget.. or any reference about this written by flutter.
Thank you.
For Android:
You can't listen to phone unlock event after Android 8.0, see https://stackoverflow.com/a/20225681/10874380
For iOS:
I'm not very familiar with iOS restrictions, but as far as I know, apps on iOS has no way to know the phone is unlocked. Also, ios apps can't open without user tapping on it.
I have created SplashScreens for my Flutter app for both iOS and Android using the native way which is editing the LaunchScreen.storyboard and it is working currently when I run my app but the SplashScreen does not hold long enough and is there a way to programmatically hide the native splashscreen in dart after I am done with some data processing and logic?
The solutions I found online are all flutter apps with SplashScreen that is build using flutter widgets and not the native way...
Even if you build the splash screen if Flutter, you still need to set one in via XCode. Otherwise, the app loads with a momentary plan white screen and Apple rejects it.
If you want to extend the time till the moment data process is over, then you will have to make a replica of LaunchScreen.storyboard in Flutter. The data processing and logic are written in Flutter. There's no way it can tell LaunchScreen.storyboard "I am done". What you can do is though, make a splash screen in Flutter which will look like LaunchScreen.storyboard. And once the data processing is done, you can navigate the user to the desired screen. Since the two screens are same, use won't see the difference and the app will smoothly show the next screen.
Just a word of caution - be careful about extending the timing of launch screen. Apple may reject the app. See if something can be done after the screen load. You can use flutter after layout package for this or the below line will do the trick :
WidgetsBinding.instance
.addPostFrameCallback((_) => myFunction(context));
This thread may help you to delay the screen for XX seconds.
I'm developing an app that works with sensitive information.
One of the requirements is that when a user puts the app in background the content that the app is currently displaying has to be hidden, so if another person navigate through the apps in background he can't see the last screen where the user was.
Any ideas on how to do that?
I tried to show an overlay when the app moves to AppLifecycleState.paused, but it doesn't work for me, the app prints a message if I want but it can't update the UI.
Edit
Shameless plug: i did a library for doing just that as I also needed it:
https://pub.dev/packages/secure_application
Answear
Build is not called after paused, at least on Android.
For Android I used a flutter_windowmanager package (modified to still be able to build on IOS):
https://github.com/neckaros/flutter_windowmanager
When my app need securing I add the flag secure:
FlutterWindowManager.addFlags(FlutterWindowManager.FLAG_SECURE)
And my app is now a black screen in the app switcher.
You should still hide content your way for when the user get back to the app.
Otherwise you can go native:
https://medium.com/#mehmetf_71205/securing-flutter-apps-ada13e806a69