User metadata as first activity

Hello!
I am trying that the app takes user metadata(username, phonenumber and email) the first thing when the app is installed. This is so that the user need not navigate through the menus to enter these details.
I made a new activity and managed to take this data and save it in the respective shared preferences.

This is how i am storing the data:

editor.putString(PreferenceKeys.KEY_METADATA_USERNAME, user);
                editor.apply();
                editor.putString(PreferenceKeys.KEY_METADATA_PHONENUMBER, contact);
                editor.apply();
                editor.putString(PreferenceKeys.KEY_METADATA_EMAIL, mail);
                editor.apply();

After this, on navigating to General Settings>User and device info>Form Metdata through the app, the data entered by the user is visible.
But now, this metadata is not being recorded in the xml form.

PS: I am making forms through the online XLSForm tool, and I have included these metadata fields in the excel sheet.

I think you need to call initProperties() after you change those values.

3 Likes

Thank you so much! Really appreciate this active community and its moderators.

1 Like