EMDKWrapper class for non-Zebra devices concerns

Hello,

 

I'm trying to create EMDKWrapper class so that I could use EMDK features on non-Zebra devices (following this article).

 

Three things are comming into my mind here:

1. First, I cannot Override release method, so I understand it should be just public method in EMDKWrapper class and should be user in MainActivity when manager should be released (e.x.: in onDestroy method);

     Shouldn't it be only:

 

public void release() {
   if (emdkManager != null) {
   emdkManager.release();
   emdkManager = null;
  }
}

without Overriding?

 

2. Second, I'm I correctly thinking that *this* bracket should cover onOpened(EMDKManager emdkManager), onClosed() and release() method, not only getEMDKManager(Bundle savedInstanceState) method inside EMDKWrapper class?

 

3. Third, the concern here is similar to the first one, presented above: I am not able to override getEMDKManager(Bundle savedInstanceState) in my project.

  • How can I do that?
  • Maybe it is enough to move code from getEMDKManager(Bundle savedInstanceState) to the constructor of EMDKWrapper class? Just like this: