I am working on a Flutter project , where I am checking the AndroidId of a device while loading the app, using the device_info_pluging package.
I am working on the project on 2 computers, usually switching between them twice a week, pulling and pushing the changes to/from GitHub private repository.
Working with a physical phone for testing (since the app uses Bluetooth).
I am constantly facing 2 strange problems:
1. whenever I run the app in the first time on a computer (after pulling changes from GitHub), I get the below message - Signatures do not match.
I would accept the fact i need to uninstall/reinstall the app when switching between computers for signatures, but.....
The 2nd problem I am facing is really strange.
2. The AndroidId of the device I am using (old Samsung S7) is changing between the computers
I am using this function to pull the AndroidId from the device (or the identifierForVendor if i would use iPhone).....
Future<String> getDevInfo() async {
final deviceInfoPlugin = DeviceInfoPlugin();
if (Platform.isAndroid) {
final deviceInfo = await deviceInfoPlugin.androidInfo;
deviceHostName = deviceInfo.androidId.toString();
} else if (Platform.isIOS) {
final deviceInfo = await deviceInfoPlugin.iosInfo;
deviceHostName = deviceInfo.identifierForVendor.toString();
}
return deviceHostName;
}
on each computer the device (The Samsung S7) shows a different AndroidID.
here are the screenshots of the same device from 2 different computers. (My apologies for the quality of the images)
Computer 1 is a Dell Workstation,
Computer 2 is a Dell Laptop,
The screenshots describe all the DeviceInfo Object, to emphasize that the other properties are exactly the same.
Do my problems relate to each other? I would have tolarated the first prblem if wouldn't have faced the second, or do they have nothing to do with each other?