code4romania / mon-vot-android-kotlin

Android election monitoring app - a mobile app through which commissioned observers can easily report back to their respective NGOs throughout the election day
https://votemonitor.org
Mozilla Public License 2.0
7 stars 29 forks source link

"New Version Available" check #189

Open aniri opened 4 years ago

aniri commented 4 years ago

Every time a user opens the app we should check if they're on the latest version on the Play Store. If they're not, we should show a dialog that tells them to update.

Ideally we'd have 2 flags on RemoteConfig:

Both flags will default to true.

Should look similar to the iOS implementation: Simulator Screen Shot - iPhone 11 Pro - 2020-01-13 at 11 06 02

Texts: EN

RO

lukstbit commented 4 years ago

Is the dialog UI an absolute requirement? If not we could use the default in-app updates. This would require a dependency on the com.google.android.play:core library from Google.

aniri commented 4 years ago

Is the dialog UI an absolute requirement? If not we could use the default in-app updates. This would require a dependency on the com.google.android.play:core library from Google.

@lukstbit no, the dialog is not a requirement, it is just a suggestion. You are right, using the default in-app updates would be better :)

aniri commented 4 years ago

hey @lukstbit :smiley: ! would you be interested in handling this task with the default in-app updates?

VladCuciureanu commented 4 years ago

@aniri I'll take this issue if it's still free

aniri commented 4 years ago

@aniri I'll take this issue if it's still free

@VladCuciureanu yep, it's free! thanks!

pedrofsn commented 4 years ago

@aniri this task is opened yet? If yes, I could help!

aniri commented 4 years ago

@aniri this task is opened yet? If yes, I could help!

@pedrofsn thanks for your interest, but this task is already assigned to someone.

VladCuciureanu commented 4 years ago

@pedrofsn I would be willing to pass the issue over to you. I couldn't figure out how to implement and/or test this. Maybe you'll have more luck :)

pedrofsn commented 4 years ago

Hi, i did this task but it's getting some firebase erros. I've tried to initialize with and without koin but not worked. If it can be fixed, the update flow will works!

The error: Unable to start activity ComponentInfo{ro.code4.monitorizarevot/ro.code4.monitorizarevot.ui.login.LoginActivity}: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process ro.code4.monitorizarevot. Make sure to call FirebaseApp.initializeApp(Context) first. [...] Make sure to call FirebaseApp.initializeApp(Context) first.