Problems with android client

Hello everybody,

I have downloaded and started playing a little bit with the last OpnMRS Android Client (release v2.8.0). I logged in in the demo server and then I think I am missing something around, because I am finding many “issues”.

Just entering the app I see a toast saying “Failed to fetch visit type”.

Apart from this error, everything seems to work properly. So I register a patient, synchronization ok. I start a visit but then I can’t enter any forms.

Also when I go to settings page, a warning appears saying that I should download concepts, but then I try to download them and the app crashes.

Any clues about what is going on?

cc @f4ww4z

helo @jamessmith , your welcome to openmrs community

can this be of help?

First of all, thanks for your answers!

Ok, now adding encounters and form entries when a patient is created and a visit is started is working. (Don’t know what I was missing but it’s ok :slight_smile: )

Now is still failing the concepts download and the “Failed to fetch visit type” keeps showing:


As a new user, I can’t upload more than one image, so here I put a link to view it:

Any clues about what am I missing?

Still getting the same issues. Someone who could help?

Hi @jamessmith, this looks like a bug, but I’m not getting this error in my device (API level 28). Things to try:

  • set up a local dev environment , connect your Android device, then run and see if the bug still exists.
  • if it still errors, check the logcat for any errors (usually shown in red), and post the error messages here.

If it’s indeed a bug, we can file it in our issue tracker.

Hi @f4ww4z!

I’m getting the errors in my device (API level 27) and in a virtual device (Pixel 2 API 28). I also get the errors when connecting to the demo server and my own server.

This is the Logcat output for the download concepts error

2019-10-21 18:23:38.390 22438-22438/ E/AndroidRuntime: FATAL EXCEPTION: main
    Process:, PID: 22438 Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=0 contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x42 color=0x00000000 number=0 vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)
        at android.os.Handler.dispatchMessage(
        at android.os.Looper.loop(
        at java.lang.reflect.Method.invoke(Native Method)

For the Failed to Fetch visit type error, I see this ouput (although I think it does have nothing to do with the error…)

2019-10-21 18:29:03.289 2984-3054/? E/WindowManager: win=Window{d2dab08 u0 EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=false win.mRemoveOnExit=false win.mViewVisibility=8,

Hi @jamessmith , yes it is a bug, do file it in our issue tracker . The description you mentioned looks good already, so just copy it when filing a new issue.

Note that the app doesn’t have a feature where it uses the visit types yet.

Hey @f4ww4z ! Sorry for the delay, I’ve been busy these days.

I posted the issues: Error when download concepts and Failed to fetch visit type. I don’t really knew if I have posted them in the right place, since I am not used to this issue tracker.

Let’s see if these issues can be solved soon.


Hi @jamessmith you need to post these issues in the Android Client(AC) project and not in System Administration. For reference see this

1 Like