The all-new DHIS2 Android App

Hi @usfreak13,

you can connect the app to your DHIS2 server as long as you are using 2.29 or 2.30.
For older versions you need to use the old apps.
For 2.31, we will release a new version by the end of the week.

Which kind of error are you receiving?

Thanks,
Marta

4 Likes

Hello Marta,

Im using 2.30 and error im getting is unable to connect check server url username and password.

But on google chrome the link is also opening and login is also fine.

But its not getting registered on the Android app…cant understand the reason and error.

Put some light if you have any.

Thanks

2 Likes

Hi Rahul!,

You should check the server url, we have seen other cases like the one you describe.
The link can redirect you to the login screen on web yes, but that does not mean it is the “server url”. The app needs the whole path to where dhis is installed in the server.

For example:
https://play.dhis2.org/android-current/api/me
In this case, https://play.dhis2.org/android-current is the server url. But there are cases where there is an extra path in the url before /api.

Let me know if that helps you. And if you are having trouble and you can share your server url we could have a look.

4 Likes

Dear Pablo,

Thanks for the info. I’ve already tried various means and ways by putting different URL’s with full path and otherwise but its not connecting.

In my case its now stuck at authenticating screen and not moving a head from there.

Any way would you like to suggest for the same.

My URL is - http://180.151.244.196:8080/dhis

Please have a look and check if this is connecting in your app.

Thanks in advance.

4 Likes

Hi @usfreak13,

we would need testing credentials to test the log in. Would you mind sending them to @Pablo (pajuelo@quadram.mobi) and me (marta@dhis2.org).

Best,
Marta

2 Likes

Hi @usfreak13,

I’ve found the issue comes from the API call to:

http://180.151.244.196:8080/dhis/api/me?fields=id,code,name,displayName,created,lastUpdated,birthday,education,gender,jobTitle,surname,firstName,introduction,employer,interests,languages,email,phoneNumber,nationality,deleted,userCredentials[id,code,name,displayName,created,lastUpdated,deleted,username,userRoles[id,code,name,displayName,created,lastUpdated,deleted]]

Seems a problem with the brackets. Please check this post:

6 Likes

Hi,

If this is caused by the common “bracket problem” (that tomcat 8.0.35 or later does not allow square brackets unless it has been explicitly permitted via a setting in Tomcat’s “server.xml” configuration file), then the problem should appear when opening e.g. Tracker Capture in the web too… Rahul, does Tracker Capture opens normally in your browser?

Regards
Calle

4 Likes

Hello Calle,

I guess you are right there is problem opening tracker capture in web too. Attached is the screenshot for the same.

Kindly guide steps how to rectify this issue so we can open the app connecting to our server too.

Best,
Rahull

4 Likes

@usfreak13

Right - that is an easy fix then:

  1. Open the server.xml tomcat config file (it’s in the CONF folder). Note that the file is usually protected, so you need administrator privileges etc to change it.

  2. Add the relaxedQueryChars = “[]” setting to this section:
    Connector port=“8080” protocol=“HTTP/1.1”
    connectionTimeout=“20000”
    relaxedQueryChars="[]"
    redirectPort=“8443”

  3. Restart the server (tomcat) after saving the server.xml file.

Best regards
Calle

6 Likes

Dear Pablo & @Calle_Hedberg

I’ve rectified the Tracker Capture issue in DHIS 2.30 after going through your shared post. Tracker Capture is now opening with Metadata loading in web but still im facing problem while its connecting to the database through the APP.

Its still stuck at authenticating window.

Kindly check the link again if its opening on your app and advice.

Best,
Rahull

4 Likes

I spent a few hours confused by this last week, could the installation guide be updated to reflect the issue?

4 Likes

@Calle_Hedberg, I once asked in this post https://community.dhis2.org/t/best-optimal-configuration-in-terms-of-software-requirement-versions-for-a-dhis2-2-30-on-ubuntu-16-04/35292
what the best/optimal settings in terms of software requirments would be and you noted something critical - Tomcat 8.5.x (I have not tested Tomcat 9), just remember to include the relaxQueryParameter setting to disregard the use of square brackets if you use build 8.5.35. I vote that this be included in documentation. Am sure many will still run into this

4 Likes

Dear Pablo & @Calle_Hedberg ,

Cheers… Successfully able to login the DHIS APP 2.0 on DHIS 2.30… Testing data on it now.

Only thing it takes longer time for the first time to sync and update data on the APP. Can we look into lowering the sync time and data sync.

Thanks again.

6 Likes

@usfreak13

Initial configuration time depends on many factors, in particular how many orgunits the user have access too (it works OK with up to 1,000+ orgunits, but it takes considerable time and there are obviously some limit), the size of your Tracker / Event program and so forth.

I would suggest you experiment a bit - using users with access to one facility and another with access to 1,000, as an example - in order to track down exactly which part of your specific installation that takes too much time to synch. Also do some meta-data and data synching from the settings window, and see if it’s faster (or slower) there.

In all fairness to the developers: it is difficult for them to effectively respond to general requests for “better performance” - much better if you can focus on specific, proven bottlenecks (like “synch time goes up 10 times when the number of stages increases from 1 to 5” - just as a made-up example).

Regards
Calle

6 Likes

True. I really liked the todays work and hope for the best as we progress

4 Likes

@usfreak13

I’ve just downloaded/installed v 1.2.0 myself, and it took around 2 minutes to synch the meta-data plus around 3 min to synch the data (500 cases, 1000 events). That’s more or less as with earlier versions.

@marta

Is there a way to control which program cases are downloaded during the data synch? I do have several Tracker Programs on the same system, but with version 1.1.1 and earlier the cases and events downloaded were mostly from the “main” tracker program. With 1.2.0, all cases and events are downloaded from another program that’s seldomly used - AND I cannot figure out how to dump those cases and instead download cases from the “main” Tracker Program… I can open the initial profile form for the “main” program, and it says “enter your search criteria” at the bottom - but the main Case ID field (usually auto-populated with six-digit unique ID) is locked…

I am able to open a new case for the “main” program though, but it seems like some of the erratic program rule behaviour persists… (this is test 1, so will test further and report via Jira)

Regards
Calle

4 Likes

Hi @Calle_Hedberg,

we will give more control on the data downloaded when we are able to work on this issue (https://jira.dhis2.org/browse/ANDROAPP-1804), concretely in this related one (https://jira.dhis2.org/browse/ANDROAPP-1960) in which we are considering to add a parameter “per program” in the number on TEI’s downloaded (similar to the “per org unit” which is already present). But for now, we are focusing on stabilizing the app and we don’t have a timeline for new features.

In any case, I cannot find a reason for you downloading very different data from one version to another, unless your data has changed (i.e. last updated more recent… enrollments closed… ). If you sync two versions of the app to the same server, do you get different TEI’s downloaded?

Best,
Marta

3 Likes

@marta

The test instance I’m using is exactly the same test instance we used for v 1.1.1 2-3 weeks ago (and which Nancy, Jose, and you have access to) - which is why I find this behaviour so weird. During all those previous tests, the initial synch would result in 500 cases from the “main” Tracker Program being downloaded - now all 500 cases downloaded are from a Tracker Program used as an “archive” that in the test instance have negligible or no data for the last 12 months. (in other words, you have access so you can try yourself).

I am able to capture a NEW case for the main Tracker Program, but not edit any existing one (which is typically what field investigators will be doing). Also, after capturing the profile and stage 1, I cannot get out again - whenever I press the “back” arrow in the profile screen, it jumps forward to stage 1 instead of back to the program&case list. That is “new” behaviour too, it did not do that in 1.1.1

regards
Calle

3 Likes

Hi Calle,

If you have verified inconsistencies, please create a jira issue.

3 Likes

Hello @usfreak13, did you get this resolved?

2 Likes