Unable to log into my dhis2 local instance from my android app

I have a local instance of dhis2 ver 2.37 running in Windows. I am unable to connect to the instance from the android app. What am Idoing wrong?

1 Like

Hello @Ekwiah .

In order to connect one device (Android or PC) to your Windows machine. Both devices should be on the same network. Is that the case? Then you should know the IP of the Windows machine and connect to it from any other device. Because probably from your Windows you are accessing directly to the instance as localhost .

1 Like

Hello Jaime
Thanks for the response. Both my phone and the laptop devices are on the same subnet. I tried unsuccessfully to connect to the local IP address given by the router. However, I can connect from my phone to the academy instance we used for the training and to our national Tracker instance.

I have completed my first project after the academy and I want you to take a look in your spare time and help me improve it. It is supposed to be a monitoring tool for all levels of the Ghana Health Service when doing monitoring for HIV in our health facilities. It has not yet been tested. We intend to do some field testing next week. The application is the HIV Monitoring Tool

We have 16 regions and I have an account for each region. GAR is one of such regions. We have 275 districts and I intend creating similar accounts at that level as well.

Secondly I used the QR Code generator to generate the QR Code for our url. It never worked from the android device. However, when I copy the short code it generated into the browser, it works. Can you please look into that as well.

Thirdly, can I use a data element to populate the Option Set rather than typing the options manually each time.

Thanks and the training was worth it.

Ekow Wiah

Hi @Ekwiah
I’m glad you found the training worthy and helpful. Thank you for posting to the community about your project. For the project support please add more details that you’d like the community experts to have a look at to get feedback in this discussion form. You can also send email for further support, see PM.

Please open a new topic post for each question! The question about the QR Code could you explain further how it never worked? Maybe steps to reproduce this and which version of the app are you using.

Also please add more details for your third question.

Thank you and wishing you success in your endeavors!

Hi @Ekwiah .

Let’s see if I can help you although this is more a network issue (I believe) and not related directly to Android.

Network issues
If your Android and your PC are in the same LAN they should be able to talk to each other unless:

  1. Your PC is running a firewall
  2. Your Access Point is running specific rules like isolation preventing that.
    Let’s assume none of the above is present.
  3. Can you ping the IP address of your phone from your PC? You can get the IP of your phone under Wireless settings > Advance
  4. You should ideally try also the other way around but this would imply installing some stuff on your Android device.
    If you can ping and get a response this means they can likely can see each other. At least at network level.

Now you should make sure that your DHIS2 server is running and other devices in the same LAN can connect. 1. Do you have another PC in the same network where you could enter the IP of the server and see if ti works?
2. Can you try putting the IP address directly on your Android browser (not the Android DHIS2 App) and see the login screen?
In case you cannot then there is a problem, obviously, and I would supsect it might be your Windows server blocking the connections, maybe at firewall level (or at Docker level in case you are using that as your installation method).

For the QR code
Which address did you use? If you have used an IP (i.e. 192.168.X.X) you might be having problems because of the network issues and not because of the code given the fact that it is working on your PC. If you have used something like localhost (or 127.0.0.1) it is normal it doesn’t work as this addresses are reserved per device and will loopback to the localhost of the device, so for Android localhost means Android and for the PC localhost means the PC.

** For the Option Set**
I am not sure I understand your question. If you have used options you should have a dropdown showing all the options that then you can pick.

Let me/us know.

Best.

1 Like