EyeSeeTea / pictureapp

Mobile application designed to report cases of malaria (to a DHIS2 server)
GNU General Public License v3.0
4 stars 4 forks source link

Verify null networkInfo #2450

Closed xurxodev closed 4 years ago

xurxodev commented 4 years ago

:pushpin: References

:gear: branches

app: Origin: maintenance/fix_offline_soft_login_bug_in_tablet_without_sim_card Target: v1.4_connect bugshaker-android: Origin: downgrade_gradle_version
EyeSeeTea-SDK: Origin: development

:tophat: What is the goal?

A customer has reported bug to realize soft login in offline mode.

:memo: How is it being implemented?

The problem is retrieving networkInfo on devices with sim card because connMgr.getNetworkInfo(android.net.ConnectivityManager.TYPE_MOBILE) returns null in this scenario.

I have added null condition for TYPE_MOBILE and TYPE_WIFI verifications and I have added a try catch block also.

:boom: How can it be tested?

Configure emulator to poor connection

UseCase 1: Open in offline mode the app in a device without a sim card and soft login should work UseCase 2: Open in online mode the app in a device without a sim card and soft login should work

:floppy_disk: Requires DB migration?

:art: UI changes?