Inserting code in android activity lifecycle

I’m integrating umeng sdk into defold, through extension.The SDK require me to put UMGameAgent.onPause() and UMGameAgent.onResume() in the activity’s onPause and onResume, How can I do this?

You get minimize and resume events in one of the native extension life cycle callbacks that you set up when you create you extension. It’s in the on_event callback: https://www.defold.com/ref/dmExtension/#DM_DECLARE_EXTENSION:symbol-name-appinit-appfinal-init-update-on_event-final

OK,I’ll try it out.Thank you.