Skip to content

Commit 636e8fc

Browse files
authored
Update Readme.md
Repository changed to jitpack.io Code Updated to work on A11
1 parent c07dfdf commit 636e8fc

File tree

1 file changed

+63
-3
lines changed

1 file changed

+63
-3
lines changed

README.md

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# DeviceIdentifiersWrapper-Sample
22

3+
# NEW !!! Change of REPOSITORY and new UPDATE 0.3 FOR A11... #
4+
```text
5+
Update your graddle distribution to >= 7.3.3
6+
update your compileSdkVersion to 30
7+
Update your Manifest.xml file to add the Query element (as explained in this description)
8+
Add jitpack.io repository to the project build.graddle file : maven { url 'https://jitpack.io' }
9+
Update the dependency in the graddle application file: implementation 'com.github.ltrudu:DeviceIdentifiersWrapper:0.3' or replace 0.3 with + to get the latest version automatically
10+
```
11+
312
A wrapper to easily retrieve the Serial Number and the IMEI number of an Android 10+ Zebra device.
413

514
How to access device identifiers such as serial number and IMEI on Zebra devices running Android 10
@@ -23,6 +32,13 @@ To use this helper on Zebra Android devices running Android 10 or higher, first
2332
<uses-permission android:name="com.symbol.emdk.permission.EMDK" />
2433
```
2534

35+
Then add a query element to retrive the data (only necessary for Android builds >= 11)
36+
37+
```xml
38+
<queries>
39+
<provider android:authorities="oem_info" />
40+
</queries>
41+
```
2642

2743
Then add the uses-library element to your application
2844
```xml
@@ -31,6 +47,18 @@ Then add the uses-library element to your application
3147

3248
Sample AdroidManifest.xml:
3349
```xml
50+
<?xml version="1.0" encoding="utf-8"?>
51+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
52+
package="com.zebra.emdk_deviceidentifiers_sample">
53+
<!--> TODO: Add these permissions to your manifest </-->
54+
<uses-permission android:name="com.zebra.provider.READ"/>
55+
<uses-permission android:name="com.symbol.emdk.permission.EMDK" />
56+
57+
<!--> TODO: Add query element to your manifest </-->
58+
<queries>
59+
<provider android:authorities="oem_info" />
60+
</queries>
61+
3462
<application
3563
android:allowBackup="true"
3664
android:icon="@mipmap/ic_launcher"
@@ -47,23 +75,55 @@ Sample AdroidManifest.xml:
4775
</intent-filter>
4876
</activity>
4977
</application>
78+
</manifest>
79+
```
80+
Update your project build.graddle file to add jitpack repository
81+
```text
82+
maven { url 'https://jitpack.io' }
5083
```
84+
Sample project build.gradle
85+
```text
86+
buildscript {
87+
repositories {
88+
google()
89+
jcenter()
90+
maven { url 'https://jitpack.io' }
91+
}
92+
dependencies {
93+
classpath 'com.android.tools.build:gradle:7.2.1'
94+
95+
// NOTE: Do not place your application dependencies here; they belong
96+
// in the individual module build.gradle files
97+
}
98+
}
5199
100+
allprojects {
101+
repositories {
102+
jcenter()
103+
google()
104+
maven { url 'https://jitpack.io' }
105+
}
106+
}
107+
108+
task clean(type: Delete) {
109+
delete rootProject.buildDir
110+
}
111+
```
52112

53113
Finally, add DeviceIdentifierWrapper dependency to your application build.graddle file:
54114
```text
55-
implementation 'com.zebra.deviceidentifierswrapper:deviceidentifierswrapper:0.1'
115+
implementation 'com.github.ltrudu:DeviceIdentifiersWrapper:0.3'
56116
```
57117

58-
Sample build.graddle:
118+
Sample application build.graddle:
59119
```text
60120
dependencies {
61121
implementation fileTree(dir: 'libs', include: ['*.jar'])
62122
implementation 'com.android.support:appcompat-v7:28.0.0'
63123
testImplementation 'junit:junit:4.13'
64124
androidTestImplementation 'com.android.support.test:runner:1.0.2'
65125
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
66-
implementation 'com.zebra.deviceidentifierswrapper:deviceidentifierswrapper:0.1'
126+
implementation 'com.github.ltrudu:DeviceIdentifiersWrapper:0.3'
67127
}
68128
```
69129

0 commit comments

Comments
 (0)