Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Added android device id to android device info #639

Merged
merged 7 commits into from
Oct 2, 2018

Conversation

BWMuller
Copy link
Contributor

No description provided.

@googlebot
Copy link

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. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@BWMuller
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

Copy link
Contributor

@mravn-google mravn-google left a 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,
Copy link
Contributor

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;
Copy link
Contributor

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
Copy link
Contributor

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;

///
Copy link
Contributor

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
Copy link
Contributor

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());
Copy link
Contributor

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?

@kroikie
Copy link
Contributor

kroikie commented Sep 10, 2018

Hi @BWMuller would you be able to address the comments on this PR?

@BWMuller
Copy link
Contributor Author

@kroikie Completely forgot about this PR. Have made the changes as indicated

@kroikie
Copy link
Contributor

kroikie commented Sep 11, 2018

@BWMuller Thanks for updating the PR, if you would bump the version to 0.3.0 and add an entry in the changelog I'll be happy to merge.

@BWMuller
Copy link
Contributor Author

@kroikie Have bumped the version and updated the branch with master to resolve the conflicts

@kroikie kroikie merged commit e6f85ba into flutter:master Oct 2, 2018
@maxlapides
Copy link

this is an awesome and important update! @kroikie do you have an estimate when 0.3.0 will be released to the registry?

@Hixie Hixie removed the needs love label Oct 24, 2018
andreidiaconu pushed a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
* Added android device id to android device info

* Bumped device info to version 0.3.0
andreidiaconu added a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants