简体   繁体   中英

Offline verification in Android application

I decided to create an application for our technicians in our company. This app sending email through gmail SMTP with some extra fields as working time, etc ... Its working, and Im happy :)

But, I need to distribute this app widely in our company, that means, that I need some sort of verification, that app is in THIS technician mobile phone.

My idea is to store some "verification numbers" in code, so the technician, that run app for the first time, will be asked for enter unique number to identify the person, who is using it.

My question is :

Is there any way how is this possible to code?

For example, the app runs for the first time, then the popup in-app window will be displayed, askking for the unique number. Then it will be paired with telephone number and technician name.

Like : if a=1234 then String phone = 987654 and String nameoftech = Bill Gates

Can you help me pls ?

Really what you are looking for is authentication. But having this type of information hardcoded is not a common use case so you will probably not find an example anywhere of exactly what you had in mind. A better option might be to use basic drop-in firebase authentication . Fairly easy to implement and you could set up users in the firebase console.

Otherwise just generate some random numbers tied to each user and hardcode them in the app. Then give them that number as their login. They enter in in an EditText you check if it matches hardcoded values.

Good luck and happy coding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM