Skip to content

Draft: A possible fix for verifying the connection to the server

Nicholas Reis requested to merge Issue_396_Verifying_Connection into main

License and Copyright Notice

By submitting this issue or commenting on this issue, or contributing any content to this issue, you certify under the Developer Certificate of Origin that the content you post may be licensed under GPLv3 (for code) or CC-BY-SA 4.0 International (for non-code content).

Branch Name

Issue_396_Verifying_Connection

Related Issues

Closes Issues #396

Description

This merge request will allow us to know when the application has a connection to the server using a socket. This will allow us to know when to write to the local database and when we are able to synch the local database to the database on the server.

Steps to Test

(List the steps needed to test this merge request here using bullets, for ex:)

  1. Run the app when you have an internet connection and your IP is registered to the firewall. The Logcat should say that you are conencted.
  2. Run the app when you have an internet connection but your IP is not registered to the firewall. The Logcat should say that you are not connected.
  3. Run the app when you do not have an internet connection but your IP is registered to the firewall. The Logcat should say that you are not connected.
  4. Run the app when you do not have an internet connection nor is your IP registered to the firewall. The Logcat should say that you are not connected.

Developer Notes

(List any notes you have about what you did here using bullets, for ex:)

  • This version currently uses code found on Stack Overflow. It will have to be modified to fit our purposes and so that their is no licensing Issue.
  • A possible fix to tell the rest of the application when to write to the local database and when to write to the server's database would be to make a JSON config file that would be put into the assets folder or we can create a class which houses a static boolean variable that could be accessed by every file.
Edited by Nicholas Reis

Merge request reports