Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ltrudu authored Aug 12, 2020
1 parent 30046c6 commit 29d4923
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ You can do it using StageNow, more details here: https://github.com/darryncampbe
Or you can use this wrapper that will automatically register your application if it is necessary.



To use this helper on Zebra Android devices running Android 10 or higher, first declare a new permission in your AndroidManifest.xml

```xml
<uses-permission android:name="com.zebra.provider.READ"/>
<uses-permission android:name="com.symbol.emdk.permission.EMDK" />
```


Then add the uses-library element to your application
```xml
<uses-library android:name="com.symbol.emdk" />
Expand All @@ -45,6 +47,7 @@ Sample AdroidManifest.xml:
</application>
```


Finally, add EMDK dependency to your application build.graddle file:
```text
compileOnly 'com.symbol:emdk:+'
Expand All @@ -62,10 +65,12 @@ dependencies {
}
```


Add the module DeviceIdentifierWrapper as a dependency to your application.

Now you can use the following snippet codes to retrieve IMEI number and Serial Number information.


Snippet code to use to retrieve the Serial Number of the device:
```java
private void getSerialNumber(Context context)
Expand All @@ -91,6 +96,7 @@ Snippet code to use to retrieve the Serial Number of the device:
}
```


Snippet code to use to retrieve the Serial Number of the device:
```java
private void getIMEINumber(Context context)
Expand All @@ -116,6 +122,7 @@ Snippet code to use to retrieve the Serial Number of the device:
}
```


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.

Sample code if you need to get both device identifiers:
Expand Down

0 comments on commit 29d4923

Please sign in to comment.