File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
src/main/java/com/zebra/deviceidentifierswrapper Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ android {
88 defaultConfig {
99 minSdkVersion 19
1010 targetSdkVersion 33
11- versionCode 10
12- versionName " 0.9.1 "
11+ versionCode 11
12+ versionName " 0.9.2 "
1313
1414 testInstrumentationRunner ' androidx.test.runner.AndroidJUnitRunner'
1515
Original file line number Diff line number Diff line change 22
33import android .content .Context ;
44import android .net .Uri ;
5+ import android .os .Build ;
56import android .text .TextUtils ;
67import android .util .Log ;
78import android .util .Xml ;
@@ -190,7 +191,20 @@ private void onEMDKManagerRetrieved(EMDKManager emdkManager)
190191 {
191192 try {
192193 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+ }
194208 } catch (EMDKException e ) {
195209 logMessage ("Error when trying to retrieve profile manager: " + e .getMessage (), EMessageType .ERROR );
196210 }
You can’t perform that action at this time.
0 commit comments