Java Question onCreate not called in library ActivityObject

alwaysbusy

Expert
Licensed User
Longtime User
it looks like the onCreate() method is never called in my library where I have to set the mAmbientController:

B4X:
public class ABWearOS extends FragmentActivity implements AmbientModeSupport.AmbientCallbackProvider, DataClient.OnDataChangedListener, MessageClient.OnMessageReceivedListener, CapabilityClient.OnCapabilityChangedListener {
   private static String _eventName;
   private static BA _ba;
   
    private boolean mShowDebug=false;
   
    private AmbientModeSupport.AmbientController mAmbientController;
   
    private boolean mIsLowBitAmbient=false;
    private boolean mDoBurnInProtection=false;
   
    @Hide
    @Override
    protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       
       BA.Log("onCreate()");  // <-------------- never called
     
       mAmbientController = AmbientModeSupport.attach(this);       
    }

Setting it in Initialize fails with an error.
 

alwaysbusy

Expert
Licensed User
Longtime User
I give up after more of a week struggling to make this lib. As this is just for a personal project, I'm going to write it in Android Studio. But still, thanks for all the help!

EDIT: I think I understand what you mean with #Extends (I was not aware that this was possible) so I'm going to continue the quest...
 
Last edited:
Top