You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then add the uses-library element to your application
24
26
```xml
25
27
<uses-libraryandroid:name="com.symbol.emdk" />
@@ -45,6 +47,7 @@ Sample AdroidManifest.xml:
45
47
</application>
46
48
```
47
49
50
+
48
51
Finally, add EMDK dependency to your application build.graddle file:
49
52
```text
50
53
compileOnly 'com.symbol:emdk:+'
@@ -62,10 +65,12 @@ dependencies {
62
65
}
63
66
```
64
67
68
+
65
69
Add the module DeviceIdentifierWrapper as a dependency to your application.
66
70
67
71
Now you can use the following snippet codes to retrieve IMEI number and Serial Number information.
68
72
73
+
69
74
Snippet code to use to retrieve the Serial Number of the device:
70
75
```java
71
76
privatevoid getSerialNumber(Context context)
@@ -91,6 +96,7 @@ Snippet code to use to retrieve the Serial Number of the device:
91
96
}
92
97
```
93
98
99
+
94
100
Snippet code to use to retrieve the Serial Number of the device:
95
101
```java
96
102
privatevoid getIMEINumber(Context context)
@@ -116,6 +122,7 @@ Snippet code to use to retrieve the Serial Number of the device:
116
122
}
117
123
```
118
124
125
+
119
126
As the previous methods are asynchronous, if you need both information, it is strongly recommended to call the second request inside the onSuccess or onError of the first request.
120
127
121
128
Sample code if you need to get both device identifiers:
0 commit comments