-4

Am developing an android application that will be used in a single device to register all the employee with their fingerprint and to send the data back to the da.

I have developed an application as Guided Here which can read the fingerprint. But it can only read fingerprints which were previously registered in the device.

How can i make it read all the employee fingerprints so as i can post it back to the databases?

eli
  • 8,571
  • 4
  • 30
  • 40

2 Answers2

2

Obviously, you have to cache your database inside android device. Just put your database in the correspond directory.

You can use both shared preferences and SQLite queries. It depends on size of the database and other parameters .

Vyacheslav
  • 26,359
  • 19
  • 112
  • 194
  • THanks @Vyacheslav but my database is very large is for media communication Industry , Is it possible to save it all in the sqlite? ? – eli Sep 09 '17 at 10:34
  • How much is it?Of course you can . But do you really want to write your own sync system? I would suggest to try to use firebase database .it easy works for both online and offline . – Vyacheslav Sep 09 '17 at 11:16
  • the app will have only one admin and all the others will be use it to read the infomation posted. And no input from app just is from my admin console.It seems like the firebase work with the data which inported from the app. Is it still possible to use firebase on this – eli Sep 12 '17 at 06:08
0

Use shared preference

to store values in shared preferences:

SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
SharedPreferences.Editor editor = preferences.edit();
editor.putString("UserID","ABC");
editor.apply();

to retrieve values from shared preferences:

SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
String name = preferences.getString("Name", "");
if(!name.equalsIgnoreCase(""))
{
    name = name + "  XYZ";  /* Edit the value here*/
}