Password Reset for Android Client

Tags: #<Tag:0x00007f73effc89a0> #<Tag:0x00007f73effc8838>
(Deepak Prasad) #1

Hi Everyone,

One of the main goals for the Android Client is to implement the Password Reset feature. The API endpoint can be found here by @harisu ( developed during GSoC '18).

If anyone had previous experience in using OpenMRS’ APIs endpoints in the Android Client, please guide me through so as to implement this feature on the Android App.

My guiding mentors are @f4ww4z and @csmuthukuda.

1 Like
(harisu fanyui) #2

Hi @deepak140596,

I you could start off by using the API endpoint directly using the REST webservices module and testing the feature then It will be a matter of triggering and consuming that endpoint in your app

1 Like
(Deepak Prasad) #3

I have setup the REST webservices module. I am having trouble deploying it. On the github page I can’t find a way to deploy it. Please help.

(Chathuranga Muthukuda) #4

Hi @deepak140596

Since still we are in the community boding period please interact with other students and also try to play around with the openMRS server and see whether you can understand the code base and the presenter design pattern of the Android client application first before going deep in tasks list.

(Fawwaz Yusran) #5

@deepak140596 , I agree with @csmuthukuda . Try to setup the most updated OpenMRS environments like the reference application. If you scroll down on the page, you can see the REST webservices module is already included, you just need to use the OpenMRS SDK to launch the refapp. (You can even use the SDK to setup the Refapp for you, no need to download modules separately). See the sdk wiki pages for that.

After starting the webapp locally, test the password change feature, this should guide you to how to use the endpoint.

(Deepak Prasad) #6

Thank you @f4ww4z, @harisu and @csmuthukuda for guiding me. I have successfully installed the standalone ref app with all the modules for testing.

I have been testing primarily the rest apis. One of the problems I am facing is updating User’s email for password reset in the local database using MySql or pure Sql. It would be very helpful if @harisu could guide me here.

(harisu fanyui) #7

Hello @deepak140596 for adding email, there is no UI yet its part of this years GSoC So you will either need to do it directly using something like phpmyadmin or via a command line tool like via a MySQL update query. So you have to update the user. so you typically will use a query of the form

update users set email = "" where user_id=4

if you are running it directly from a terminal or a mysql client. When that is done you need to also set the global properties required for sending email like the port, smtp, user, password. more details about this configuration can be found here