Java Question Calling super on onNewIntent

thedesolatesoul

Expert
Licensed User
Longtime User
Hi,
On looking at the B4A compiler generated Java code for an activity I found:
B4X:
    @Override
    public void onNewIntent(android.content.Intent intent) {
        this.setIntent(intent);
    }
I have a library that requires me to extend the activity from another class, and also requires me to call:
B4X:
super.onNewIntent(intent)
But unfortunately I cannot see a way around it.

So, as an alternative solution,
is Activity_Resume always called on receipt of a new Intent, even if the activity is not paused? Maybe I can use that and GetStartingIntent?

Or is there any other way?
 
Last edited:

thedesolatesoul

Expert
Licensed User
Longtime User
OK, thank you very much.
I believe their thinking of forcing to subclass the activity is that they want to make it work with existing activities with minimal change. This way you can use the activity normally as well as with their modifications (i.e. in two modes).
I agree, there should also provide a general API as well, then I could have called it from Activity_Resume.
 
Top