Password Reset for Android Client

Tags: #<Tag:0x00007f01ca2b3b08> #<Tag:0x00007f01ca2b38d8>

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

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

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.

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.

3 Likes

@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.

2 Likes

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.

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 = "someemail@gmail.com" 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

Thanks @harisu. I have one query. I am using command line tool to update the Database as I am not being able to connect to the database via MySQL Workbench or phpmyadmin.

I am on the OpenMRS standalone 2.9.0 and I cannot find my way to the users table. Please help.

@deepak140596, You surely did not follow the link I gave above. If you are using the command line tool then after logging into mysql, perform

use openmrs or what ever the name you specified when creating,

Next you need to know the user for which you are updating the password. You can find that out by issuing the command select user_id, username, email from users. that should list all available users then you can go further to update the specific user with the command I gave above or on the link. It will do you much good to go through the resources on that link. If at any point following the instructions you get stuck ping me :slight_smile: .

1 Like