Hi please help to assist me on this.
So I created a res xml file under folder res/values (fm_login.xml) and the content as follow:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="fm_screen_name"></string>
<string name="fm_email_address"></string>
</resources>
The main purpose is to check this file and make it as a setting page for the app. So later my code is looks like this for main activity
// Welcome message
String fm_email_address = getResources().getString(R.string.fm_email_address);
if (fm_email_address == "") {
strEmail_Exist = false;
Toast.makeText(getApplicationContext(), "Please sign up", Toast.LENGTH_SHORT).show();
// View SignUp Button
} else {
strEmail_Exist = true;
String strScreen_Name = getResources().getString(R.string.fm_screen_name);
Toast.makeText(getApplicationContext(), "Welcome, " + strScreen_Name, Toast.LENGTH_SHORT).show();
// View Menu Button
}
Question, when I emptied the value why I can't check if it's empty? Or should I use null to compare. Because for the first time user I need to make use their name/email is not registered yet in the app/mobile.
Appreciate for the assistance, since it's been pending for a while.