Receiving text from other app share to my App props

Hello. I am using ejected expo project to create app that receives simple text intent from other apps. I want to pass this text to App component props. I searched a lot about how to do it.

I put appropriate intent filters to my MainActivity in AndroidManifest and my app is displayed in others share menu. Now I am using this code in my

public Bundle initialProps(Bundle expBundle) {
  // Add extra initialProps here
  Intent intent = MainActivity.this.getIntent();
  String myText = intent.getStringExtra(Intent.EXTRA_TEXT);
  expBundle.putString("myText", myText);
  return expBundle;

This code works and makes me able to get the text in js App props. However, it works only when my app is not running at the moment of share. But I want to be able to receive the text to props even when my app is running in background. I tried to put this code to onCreate and onResume methods, but It does not work.

What classes/methods should I use?

I read about android activities, life cycle methods, searched in expo code repository, but I am newbie and expo magic makes it hard for me to understand how to make things work. Please help.

I too would like to know how this can be achieved.

@sighty were you able to resolve the issue? If so, how?