Android Device ID change while device factory reset

788 Views Asked by At

I need a Unique ID or Number all time, If device formate or flash.

2

There are 2 best solutions below

3
Masum Billah On

For Android development, you can use a universally unique identifier (UUID) to generate a unique ID that can persist even if the device is formatted or flashed.

import java.util.UUID;

UUID uuid = UUID.randomUUID();
String uniqueId = uuid.toString();
1
Ramakrishnan On

Try using Mac address of the device