Whether it is PC-side software or Android software, sometimes when sold without outright buyout or purchase of copyright, then you need a set of selling, and to ensure that the software is forbidden to copy.
The software on the PC side can be added to the code to detect the hard drive serial number. In this case, it is not possible to copy to another computer because the hard drive serial number is identified incorrectly. Then in Android without a hard disk you need to get some other hardware parameters to uniquely identify the device.
1. Get IMEI ID: IMEI (International Mobile Equipment Identity) is an abbreviation for International mobile device identification.
Telephonymanager telephonymgr = (Telephonymanager) Getsystemservice (Telephony_service);
// Requires use-permision:read_phone_state
It is important to note that the use of this method requires permission to join:
<android:name= "Android.permission.READ_PHONE_STATE"/>
2. Get other Device parameters
Directly on the code:
Public classMainactivityextendsappcompatactivity {@Overrideprotected voidonCreate (Bundle savedinstancestate) {Super. OnCreate (savedinstancestate); Setcontentview (R.layout.activity_main); FinalTextView TV =(TextView) Findviewbyid (TextView); Findviewbyid (R.id.btn_getid). Setonclicklistener (NewView.onclicklistener () {@Override Public voidOnClick (view view) {String M_szdevidshort= "BOARD:" +build.board.touppercase () + "\ n" + "BRAND:" +build.brand.t Ouppercase () + "\ n" + "Cpu_abi:" +build.cpu_abi.touppercase () + "\ n" + "DEVICE:" +build.device.touppercase () + "\ n" + "DISPLAY:" +build.display.touppercase () + "\ n" + "HOST:" + Build.HOST.toUpperCase () + "\ n" + "ID:" +b Uild. Id.touppercase () + "\ n" + "Manufacturer:" +build.manufacturer.touppe Rcase () + "\ n" + "MODEL:" +build.model.touppercase () + "\ n" + "PRODUCT:" +build.product.touppercase () + "\ n" + "TAGS:" +build.tags.touppercase () + "\ n" + "TYPE:" +build. Type.touppercase () + "\ n" + "USER:" +build.user.touppercase () + "\ n";//digitsTv.settext (M_szdevidshort); } }); }
With these unique identities, you can make your software unique ... and cannot be copied.
Advanced Article-Android system: 1. Get unique ID for Android device