xenos92
xenos92

Reputation: 351

Create license key with IMEI for mobile

I have a question and I can't find clear answers and solutions.

I want to create a license key system to activate my application. The phones on which the application will be installed cannot be connected to the internet. Moreover, these are sometimes reinitialized and it is, therefore, necessary to install the application again.

I have never done a licensing system so any improvement is welcome. With these constraints, I thought to make sure that the user transmits his IMEI.

I generate a license key according to the IMEI. When the user enters the license key I compare if the license key matches the IMEI of the phone.

The problem is that since the versions of Android 10 and higher, it is no longer possible to recover an IMEI. Instead, we can retrieve a UUID(Unique identifier). But this can change if we reset the phone if I understand correctly. So this is not good because it will make my license invalid.

I don't see how to do it 🤔

Upvotes: 0

Views: 939

Answers (2)

C B J
C B J

Reputation: 1868

As others contributors have already said, it's getting harder and harder to uniquely identify a device. This seems to be largely due to applications abusing device identity to track user behavior and otherwise abuse personal information.

This does make life hard for people like you who are simply trying to protect their work.

Google does offer an alternative, but it takes a little shift in thinking. Instead of thinking of your software being allowed to operate on a device (requiring some unique identification), think of it as the licensed user is allowed to use your software.

Google provides an API for this; Google Play Licensing. Essentially you use Google play services to test this user's eligibility to use your software (through a remote api call to Google). There are quite a few control mechanisms and options available and although it takes a little time to understand and set up, as long as you are distributing through the Google play store, it simplifies licensing over all, and shouldn't suddenly stop working because IMEIs (or any other identifiable information) aren't available. It's also a bit harder to hack.

Hope this helps, best of luck :-)

Upvotes: 1

Randal Schwartz
Randal Schwartz

Reputation: 44186

It's not possible to get a unique identifier for either ios or Android any more. You'll have to embrace the idea that people can reinstall their phone software anywhere.

Upvotes: 1

Related Questions