Skip to content

Commit 4155cfe

Browse files
authored
Merge branch 'master' into master
2 parents 96f6b55 + 636e8fc commit 4155cfe

File tree

9 files changed

+138
-26
lines changed

9 files changed

+138
-26
lines changed

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/markdown-navigator-enh.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/markdown-navigator.xml

Lines changed: 62 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

DeviceIdentifiersWrapper/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ ext {
77
}
88

99
android {
10-
compileSdkVersion 30
10+
compileSdkVersion 32
1111

1212
defaultConfig {
1313
minSdkVersion 19
14-
targetSdkVersion 29
14+
targetSdkVersion 32
1515
versionCode 2
1616
versionName "0.2"
1717

DeviceIdentifiersWrapper/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.zebra.deviceidentifierswrapper">
33
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
4+
<uses-permission android:name="com.zebra.provider.READ"/>
45
<queries>
56
<package android:name="com.symbol.emdk.emdkservice" />
67
</queries>

README.md

Lines changed: 59 additions & 6 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,30 +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'
5194
52-
You'll need to add a the jitpack.io repository in your build.graddle file:
53-
```graddle
95+
// NOTE: Do not place your application dependencies here; they belong
96+
// in the individual module build.gradle files
97+
}
98+
}
99+
100+
allprojects {
54101
repositories {
102+
jcenter()
55103
google()
56104
maven { url 'https://jitpack.io' }
57-
}
105+
}
106+
}
107+
108+
task clean(type: Delete) {
109+
delete rootProject.buildDir
110+
}
58111
```
59112

60113
Finally, add DeviceIdentifierWrapper dependency to your application build.graddle file:
61114
```text
62-
implementation 'com.github.ltrudu:DeviceIdentifiersWrapper:0.2'
115+
implementation 'com.github.ltrudu:DeviceIdentifiersWrapper:0.3'
63116
```
64117

65-
Sample build.graddle:
118+
Sample application build.graddle:
66119
```text
67120
dependencies {
68121
implementation fileTree(dir: 'libs', include: ['*.jar'])
69122
implementation 'com.android.support:appcompat-v7:28.0.0'
70123
testImplementation 'junit:junit:4.13'
71124
androidTestImplementation 'com.android.support.test:runner:1.0.2'
72125
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
73-
implementation 'com.github.ltrudu:DeviceIdentifiersWrapper:0.2'
126+
implementation 'com.github.ltrudu:DeviceIdentifiersWrapper:0.3'
74127
}
75128
```
76129

0 commit comments

Comments
 (0)