Back

`singleTop` vs `singleInstance` in Android Flutter

  • 0
  • Android
  • Accounts
  • Flutter
Vedsaga
12 Jan, 2024, 05:47

launch mode singleTop works,

TypeScript
       <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop" />

however,

TypeScript
       <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleInstance" />

launch mode singleInstance does not works in sense that account is getting created on Appwrite however user is not getting redirected back to the app.

TL;DR
Developers are discussing the use of `singleTop` and `singleInstance` launch modes in Android Flutter. They note that using `singleTop` can cause another Flutter warmup, which is not ideal. Social login may not work properly with `singleInstance`. The suggested solution is to stick with `singleTop` for now. There is an issue in the Flutter framework that is being addressed.
Drake
12 Jan, 2024, 05:55

Yes. That's just how it will have to be now since a web view is needed for the oauth flow

Vedsaga
12 Jan, 2024, 05:59

using the singleTop is causes the another flutter warmup. Which we don't want to do it to happen as when user click on deep-link flutter seems to launches new instances which is quite un-frendily behaviour. Have seen that there is request to fix that in flutter framework however what qurious if Social Login is expected to work with singleInstance or not. As it seems it is not so guess need to stick with singleTop for now, guess close it for now...

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more