-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Added android device id to android device info #639
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed it! |
CLAs look good, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. Please bump the pubspec.yaml version number and add a CHANGELOG.md entry.
@@ -82,6 +82,7 @@ class _MyAppState extends State<MyApp> { | |||
'tags': build.tags, | |||
'type': build.type, | |||
'isPhysicalDevice': build.isPhysicalDevice, | |||
'device_id': build.deviceId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
device_id
=> deviceId
@@ -18,6 +21,7 @@ | |||
|
|||
/** DeviceInfoPlugin */ | |||
public class DeviceInfoPlugin implements MethodCallHandler { | |||
private final Activity activity; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this plugin could work with just a Context
, so that it can be used in headless mode too?
/** | ||
* Simple call to get the android hardware device Id that is unique between the device + user and | ||
* app signing. This key will change if the app is uninstalled or its data is cleared. Device | ||
* factory reset will also result in a value change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] Please end javadoc paragraph with a .
@@ -119,6 +120,9 @@ class AndroidDeviceInfo { | |||
/// `false` if the application is running in an emulator, `true` otherwise. | |||
final bool isPhysicalDevice; | |||
|
|||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dartdoc missing.
@@ -79,6 +86,18 @@ public void onMethodCall(MethodCall call, Result result) { | |||
} | |||
} | |||
|
|||
/** | |||
* Simple call to get the android hardware device Id that is unique between the device + user and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nits]
Simple call to get => Returns
android => Android
Id => ID
@@ -60,6 +66,7 @@ public void onMethodCall(MethodCall call, Result result) { | |||
build.put("tags", Build.TAGS); | |||
build.put("type", Build.TYPE); | |||
build.put("isPhysicalDevice", !isEmulator()); | |||
build.put("deviceId", getDeviceId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ID doesn't really identify the device, as you write below. Maybe rename it to androidId
?
Hi @BWMuller would you be able to address the comments on this PR? |
@kroikie Completely forgot about this PR. Have made the changes as indicated |
@BWMuller Thanks for updating the PR, if you would bump the version to |
…ter-master # Conflicts: # packages/device_info/lib/device_info.dart
@kroikie Have bumped the version and updated the branch with master to resolve the conflicts |
this is an awesome and important update! @kroikie do you have an estimate when 0.3.0 will be released to the registry? |
* Added android device id to android device info * Bumped device info to version 0.3.0
This reverts commit b9b74ba.
No description provided.