public class EMDKManager
extends java.lang.Object
Example Usage: EMDKResults results = EMDKManager.getEMDKManager(getApplicationContext(), emdkListener);
Modifier and Type | Class and Description |
---|---|
static interface |
EMDKManager.EMDKListener
This is the interface for the callback to notify the opening and closing status of the EMDK.
|
static class |
EMDKManager.FEATURE_TYPE
This lists all the features exposed by the EMDK.
|
class |
EMDKManager.StatusData
StatusData class provides access to EMDK Manager feature ready to use status.
|
static interface |
EMDKManager.StatusListener
This is the interface for the callback to notify the status of the feature object request.
|
Modifier and Type | Method and Description |
---|---|
static EMDKResults |
getEMDKManager(android.content.Context context,
EMDKManager.EMDKListener emdkListener)
This is static method and it is the key function to get the EMDKManager object.
|
EMDKBase |
getInstance(EMDKManager.FEATURE_TYPE featureType)
This method returns an object instance which has derived from EMDKBase.
|
void |
getInstanceAsync(EMDKManager.FEATURE_TYPE featureType,
EMDKManager.StatusListener statusListener)
This method is an asynchronous call and requests object instance for the specified feature type and object
is returned through the status listener callback when the feature is initialized and ready to use.
|
void |
release()
This method releases all the resources constructed by EMDKManager.
|
void |
release(EMDKManager.FEATURE_TYPE featureType)
This method releases resources of a given manager type.
|
public static EMDKResults getEMDKManager(android.content.Context context, EMDKManager.EMDKListener emdkListener)
EMDKManager.EMDKListener
to get notified of the EMDK manager status and to get the EMDKManager object.context
- The application context should be provided by the user.emdkListener
- The EMDK Listener for listener callbacks.EMDKResults
object.public EMDKBase getInstance(EMDKManager.FEATURE_TYPE featureType)
ProfileManager mProfileManager = (ProfileManager) emdkManager.getInstance(EMDKManager.FEATURE_TYPE.PROFILE); VersionManager mVersionManager = (VersionManager) emdkManager.getInstance(EMDKManager.FEATURE_TYPE.VERSION);
featureType
- The EMDKManager.FEATURE_TYPE
the object to be created.ProfileManager
and VersionManager
are returned based on the EMDKManager.FEATURE_TYPE
given in.ProfileManager mProfileManager = (ProfileManager) emdkManager.getInstance(EMDKManager.FEATURE_TYPE.PROFILE);<br>
VersionManager mVersionManager = (VersionManager) emdkManager.getInstance(EMDKManager.FEATURE_TYPE.VERSION);<br>
public void getInstanceAsync(EMDKManager.FEATURE_TYPE featureType, EMDKManager.StatusListener statusListener) throws EMDKException
getInstance(com.symbol.emdk.EMDKManager.FEATURE_TYPE)
to get the profile manager object and
sets the profile during the device boot will result in error because the underlying Profile manager is not ready.
try { emdkManager.getInstanceAsync(EMDKManager.FEATURE_TYPE.PROFILE, statusListener); } catch(EMDKException ex) { ex.printStackTrace(); }
featureType
- The EMDKManager.FEATURE_TYPE
the object to be created.statusListener
- The callback will returned on EMDKManager.StatusListener
when the feature is ready to use.EMDKException
- The exception will be thrown when the error occurs during this request.public void release()
Example Usage: emdkManager.release();
public void release(EMDKManager.FEATURE_TYPE featureType)
Example Usage: emdkManager.release(EMDKManager.FEATURE_TYPE.PROFILE);
featureType
- Type of EMDKManager.FEATURE_TYPE
to be released. Only the given feature related manager will be cleared if it has been constructed.