my app is an app for nightlife events. It's going to have two type of users: user 1 is the normal user who looks at event user 2 is the owner of a bar or a promoter.
These users don't have the same privilege, and can't do the same things. So the layout and functionalities won't be the same,
When the person logs in, I'm able to know which account he owns (thanks to my database). More precisely, user 1 has a keyAccess =0, user 2 has a keyAccess =1
I'm thinking of the code design of my app. What is the best way to handle this multi-account ?
I've thought of creating each time 2 types of activities, and check the value of the keyAccess before launching the intent. Is it good? do you have a better idea ?
Thanks a lot
Welcome to SO. A note - a good question shouldn't be opinion based, you need to ask a concrete question.
Plenty of bar app's exist and in my time working in the field I even saw some tutorials on just this. The simplest option is to create two separate apps or at least separate Activities, particularly as the only thing these two things share is the database (This applies whether you've set up as a web service or it's all on a single in-house device)
If you insist on a single app then just change the fragment or layout shown based on that boolean. There are really so many easy options available that it is impossible to give a more decisive answer to your question.