is there any way to develop first screen contents by flutter? - flutter

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.

Related

Flutter: detect if device has "back navigation" built into the OS?

In Flutter, I would like to know if the device has any functionality built into the OS for navigating back. Or in other words, if the user can trigger navigation without having an actual button within the app.
For example, an iPhone 7 does not have a physical back button or a swipe-back gesture. If the app doesn't have it's own way to navigate, the user can get stuck.
On the contrary, most modern devices have some way of going back built into the system, like a physical/virtual back button or a swipe-back gesture.
Can I distinguish between these types of devices?
From what I have seen it is only IOS that do this, so it can be done with:
if (Platform.isIOS){
#show backButton();
}
But I have not seen a package or function that specifically lets you know this information. Keep me in the loop if you find anything

Can I hide Flutter app contents when the app is in Background?

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

Is there any possibility to influence the lock screen gui

I wonder if it's possible to create a GUI for the iPhone home screen when an app is used?
Since I guess the answer is no (it was in the past, havn't found anything new about iOS 7): if I have an audio player, would it be possible to kind of 'route' it to the homescreen like the Podcasts app does it? I have looked for answers but only came across jailbroken solutions so far.
Is there anything one can do there? Thanks in advance.
No, the latest SDK (iOS 7.0) does not allow this, as in add custom GUI element to the lock screen. You can let the media player controls interact with your app if you are playing audio in the background.
And use the MPNowPlayingInfoCenter to display track, artist name and cover art on the lockscreen.
Apple doesn't allow any app to configure the Lock Screen in any way. You could have a music app which might display track details using the : MPNowPlayingInfoCenter.
Other than that all you can display is Notifications.
This isn't available on any version of iOS.

Recognising gestures from the home screen

I am developing an app for iPhone.
I am looking for a way to run some code once a drag gesture is recognized on the homescreen (or on all screens if possible).
Does anyone know how to get this with the iOS SDK using Xcode and Objective-C?
Your app cannot receive gestures anywhere in iOS except within itself and its own views while it's active (not counting system notifications and the app icon).
I doubt this is possible. To do this, you will need to hook into the OS at a lower level than is usually allowed.
iOS is locked down much more than Mac OS, I'm afraid.

Play splash movie every time app launch (with multi-task support)

the app I'm working on supports iOS multi-task feature by default, and I want to stick with this.
Upon app launch, a splash movie clip is played (code is in AppDelegate), after user hits the home button, and re-launches the app, I want to the same splash movie be played before showing the last view where use was.
I know by switching off the multi-task support, I can achieve this, but in the meanwhile, I'm losing the multi-task support feature, and I need to write code to save/resume user states. So, is there any workaround for this? thanks!
You could try the app delegate's applicationDidBecomeActive: method but quite frankly I'd consider this to be user hostile behaviour. Who wants to see a movie every time they switch between apps? The point of multitasking on the iPhone is to quickly change between apps and this violates that.