Lost Functionality after Connection Lost (LFACL)

ECn Categories > Lost Content (LC) > Lost Functionality (LF) > Lost Functionality after Connection Lost (LFACL)

A functionality is not available because there is no connection; the components that allows using the functionality disappear or are disabled but there is not message notifying the user about it.

Amount of Issues App List
5 (A21) OmniNotes, (A35) PatTrack, (A37) Runner Up, (A39) Habitica, (A44) Materialistic

Examples

OmniNotes

Category: Productivity
v 5.3.2
Scenario: To put the location in a note without internet connection
This video shows an example of an lost functionality. At 10th second the user creates a text note, fills the note form and at 24th second click on the attach menu, after that it selects location option at 26th second, there is no response from the app but at 33rd second when it go to the main view the new note has a attached location.

The following code snippets show the classes and files that are involved in the generation of the previuos issue.

In order to see how this error is generated, we need to review all the flow event. First, we have the switch that is used when the attach option is selected in a note. Between lines 2372 and 2375 the case for the location item is defined. At line 2373 the method “displayLocationDialog” is called.

omniNotes/src/main/java/it/feio/android/omninotes/DetailFragment.java

    case R.id.location:
2373.   displayLocationDialog();
		    attachmentDialog.dismiss();
		    break;

And, as it can be seen in the following snippet the “displayLocationDialog” creates at line 867 a new “OnGeoUtilResultListenerImpl” element.

omniNotes/src/main/java/it/feio/android/omninotes/DetailFragment.java

    private void displayLocationDialog() {
867.    getLocation(new OnGeoUtilResultListenerImpl(mainActivity, mFragment, noteTmp));
	  }

Now from the “OnGeoUtilResultListenerImpl” element there are a method defined starting at line 900, in this method some validations are made and as it can be seen at line 909 there is a defined behavior for when there is no connection stablished. Therefore in that case the method uses a stored location by the LocationManager.

omniNotes/src/main/java/it/feio/android/omninotes/DetailFragment.java

private static class OnGeoUtilResultListenerImpl implements OnGeoUtilResultListener {

As it can be seen until line 913, there is no dialog creation then when the return statement is reached the method sets the location given by the locaton manager to the note and do not show the dialog. In this case, when there is no internet the “set location to note” function is not available for the user due to lack of communication for the user to know this happen in the backgrounf of the app.

omniNotes/src/main/java/it/feio/android/omninotes/DetailFragment.java

    public void onLocationRetrieved(Location location) {
			  if (!checkWeakReferences()) {
			  	return;
			  }
			  if (location == null) {
			  	return;
			  }
909.    if (!ConnectionManager.internetAvailable(mainActivityWeakReference.get())) {
			  	noteTmpWeakReference.get().setLatitude(location.getLatitude());
			  	noteTmpWeakReference.get().setLongitude(location.getLongitude());
			  	onAddressResolved("");
913.	  	return;
			  }