0
I need some help from you because I’m having a hard time getting only one user to access a particular Activity.
Ex: I am developing an App where the settings screen only I will have access with my user, no other. I want to set this in the code only my userid with screen access.
private void openRestrictedSettings() {
if(userId.equals("id")){
Intent intentRestrictedSettings = new Intent(TelaPrincipalActivity.this, ActivityRestrictedSettings.class);
startActivity(intentRestrictedSettings);
}else {
Toast.makeText(this, "Apenas usuários autorizados podem acessar as configurações", Toast.LENGTH_SHORT).show();
}
}
"userPermissions" exists only in my user, no other will have it.
How can I make an Activity open only those who own the userPermissions?
Thank you so much!! :)
– Edimilson