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? https://openmrs.github.io/openmrs-android-client-user-guide/patient-activity.html#visits

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:

concepts-error

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/org.openmrs.mobile E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.openmrs.mobile, PID: 22438
    android.app.RemoteServiceException: 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.app.ActivityThread$H.handleMessage(ActivityThread.java:1916)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:7025)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

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 org.openmrs.mobile/org.openmrs.mobile.activities.login.LoginActivity EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=false win.mRemoveOnExit=false win.mViewVisibility=8, caller=com.android.server.wm.AppWindowToken.destroySurfaces:748 com.android.server.wm.AppWindowToken.destroySurfaces:732 com.android.server.wm.WindowState.onExitAnimationDone:5646 com.android.server.wm.AppWindowAnimator.stepAnimationLocked:517 com.android.server.wm.AppWindowToken.stepAppWindowsAnimation:1745

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.

Thanks!

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