How can I create a text box on iOS/Android and handle the input in MonoGame?

I want that people can create a new account in my MonoGame iOS and Android application. I need a text box for username, password and recovery e-mail address(if someone forgot his password).

-How can I create the text box? Should I make a white rectangle sprite(Texture2D) and a spriteFont to write the text(for example the username)? Or are there better ways to create the text box?

-How can I find out if someone tapped with his finger on the blank text box? Can I use Rectangle.Intersects(TappRectangle) or is it better to do this differently?

-How can I show the soft keyboard on iOS/Android after someone tapped on the text box so that they can write their username in the textbox?

-How can I get the characters they tapped on the soft keyboard?

-Is it possible to save/remember the text(login data) so that people don’t need to write it always when they start my application? I want that the text boxes are already filled out with their login credentials when they start the application, then they would just need to tap on a login button to log in.

Here’s how I’m doing it right now:

Task.Run(async () => { var result = await KeyboardInput.Show(MessageBoxTitle, MessageBoxDescription, Text, IsPassword); if (null != result) {

//your method to set text goes here

This is a built-in method in MonoGame that will pop up a native Android/iOS dialog where the user can enter text. It looks super nasty, there’s probably a way to style the dialog but I haven’t figured it out yet. Gets the job done though.

Once the user has entered their credentials, you can use the Xamarin Essentials SecureStorage package to store them. It’s an encrypted key-value store.

Thank you. The keyboard works fine on iOS and Android.