jetpack-compose-crypto icon indicating copy to clipboard operation
jetpack-compose-crypto copied to clipboard

[#102] [Integrate] As a user, I can see dialog when there is no internet connection

Open kaungkhantsoe opened this issue 2 years ago โ€ข 4 comments

  • Closes #102

What happened ๐Ÿ‘€

When there is no internet connection, it shows no internet connection dialog.

Insight ๐Ÿ“

There is an issue in using ConnectivityManager.NetworkCallback. It doesn't recognize there is no internet at the start of an application in the following scenario

  • Turn off the internet
  • Open the app for the first time
  • The app will not show the dialog

There is a possible workaround but it is out of the scope for this initiative.

Proof Of Work ๐Ÿ“น

https://github.com/nimblehq/jetpack-compose-crypto/assets/32578035/022f294a-27a4-489e-a3d2-4d7e84eec22f

kaungkhantsoe avatar Aug 02 '23 09:08 kaungkhantsoe

8 Warnings
:warning: /home/runner/.gradle/caches/transforms-3/fc63d10724654858d2ee5b467b86b5a7/transformed/jetified-dagger-lint-aar-2.43.2/jars/lint.jar#L0 - Lint found an issue registry (dagger.lint.DaggerIssueRegistry) which requires a newer API level. That means that the custom lint checks are intended for a newer lint version; please upgrade.
:warning: app/src/main/AndroidManifest.xml#L11 - On SDK version 23 and up, your app data will be automatically backed up and restored on app install. Consider adding the attribute android:fullBackupContent to specify an @xml resource which configures which files to backup, or just set android:fullBackupOnly=true. More info: https://developer.android.com/guide/topics/data/autobackup
:warning: app/src/main/AndroidManifest.xml#L14 - Attribute networkSecurityConfig is only used in API level 24 and higher (current min is 23)
:warning: app/src/main/java/co/nimblehq/compose/crypto/ui/common/Toaster.kt#L16 - Toast created but not shown: did you forget to call show() ?
:warning: app/src/main/res/drawable/ic_back.xml#L8 - Attribute fillType is only used in API level 24 and higher (current min is 23)
:warning: app/src/main/res/drawable/ic_fire_opal_arrow_down.xml#L8 - Attribute fillType is only used in API level 24 and higher (current min is 23)
:warning: app/src/main/res/drawable/ic_guppie_green_arrow_up.xml#L8 - Attribute fillType is only used in API level 24 and higher (current min is 23)
:warning: app/src/main/res/navigation/nav_graph_main.xml#L2 - The resource R.navigation.nav_graph_main appears to be unused

CoroutineTemplate Jacoco report:

Generated by :no_entry_sign: Danger

github-actions[bot] avatar Aug 02 '23 09:08 github-actions[bot]

@kaungkhantsoe Did you face this issue on your side?

When clicking on the ok button and then when the dialog is gone then the pull to refresh indicator is appear you can notice since 0.03 sec from the record๐Ÿ‘‡

https://github.com/nimblehq/jetpack-compose-crypto/assets/28002315/8b2e669b-3894-47f4-a0c1-35dc38dea879

Wadeewee avatar Aug 03 '23 03:08 Wadeewee

@kaungkhantsoe Did you face this issue on your side?

When clicking on the ok button and then when the dialog is gone then the pull to refresh indicator is appear you can notice since 0.03 sec from the record๐Ÿ‘‡

Screen.Recording.2566-08-03.at.10.02.43.mov

@Wadeewee Ahh yes, I was trying out a callback function. I will remove it from the HomeScreen and add the callback only to the DetailScreen as an example. ๐Ÿ™

kaungkhantsoe avatar Aug 03 '23 04:08 kaungkhantsoe

@hoangnguyen92dn I have updated the method of showing global dialog with different actions. Please help me review it and let me know if you have any concerns with it. ๐Ÿ™

kaungkhantsoe avatar Aug 25 '23 07:08 kaungkhantsoe