File tree 2 files changed +17
-3
lines changed
src/main/java/com/zebra/deviceidentifierswrapper
2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ android {
8
8
defaultConfig {
9
9
minSdkVersion 19
10
10
targetSdkVersion 33
11
- versionCode 10
12
- versionName " 0.9.1 "
11
+ versionCode 11
12
+ versionName " 0.9.2 "
13
13
14
14
testInstrumentationRunner ' androidx.test.runner.AndroidJUnitRunner'
15
15
Original file line number Diff line number Diff line change 2
2
3
3
import android .content .Context ;
4
4
import android .net .Uri ;
5
+ import android .os .Build ;
5
6
import android .text .TextUtils ;
6
7
import android .util .Log ;
7
8
import android .util .Xml ;
@@ -190,7 +191,20 @@ private void onEMDKManagerRetrieved(EMDKManager emdkManager)
190
191
{
191
192
try {
192
193
logMessage ("Requesting profile manager." , EMessageType .DEBUG );
193
- emdkManager .getInstanceAsync (EMDKManager .FEATURE_TYPE .PROFILE , mStatusListener );
194
+ logMessage ("Current API version: " + android .os .Build .VERSION .SDK_INT , EMessageType .VERBOSE );
195
+ if (android .os .Build .VERSION .SDK_INT < 33 ) {
196
+ logMessage ("Requesting profile manager Asynchonously" , EMessageType .DEBUG );
197
+ emdkManager .getInstanceAsync (EMDKManager .FEATURE_TYPE .PROFILE , mStatusListener );
198
+ }
199
+ else
200
+ {
201
+ logMessage ("Requesting profile manager synchronized" , EMessageType .DEBUG );
202
+ ProfileManager profileManager = (ProfileManager ) emdkManager .getInstance (EMDKManager .FEATURE_TYPE .PROFILE );
203
+ if (profileManager != null )
204
+ {
205
+ onProfileManagerInitialized (profileManager );
206
+ }
207
+ }
194
208
} catch (EMDKException e ) {
195
209
logMessage ("Error when trying to retrieve profile manager: " + e .getMessage (), EMessageType .ERROR );
196
210
}
You can’t perform that action at this time.
0 commit comments