forked from emil10001/UniqueId
-
Notifications
You must be signed in to change notification settings - Fork 0
morristech/UniqueId
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is an Android library that will create a preferences file to store a unique id. The unique id gets generated based on the system time, and then is hashed. The id will persist until the app data is cleared or the app is uninstalled. Using the UniqueId.getId() method, the id will be either generated or simply returned if it already exists. Example implementation: package com.example.exampleactivity; import com.feigdev.uniqueid.UniqueId; import android.app.Activity; import android.os.Bundle; import android.util.Log; public class ExampleActivity extends Activity { private static String TAG = "ExampleActivity"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); getId(); } public void getId(){ UniqueId id = new UniqueId(ExampleActivity.this); Log.d(TAG,id.getId()); id.generateId("user","pass"); Log.d(TAG,id.getId()); } }
About
A unique id generator for android that requires no permissions, and is stored on the device.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published