I want to tell how the app was launched - whether by user, or programmatically

For me, I want to tell how the app was launched - whether by user, or programmatically.

For example, When a user launches the app, I want to render the UI, and when the app starts automatically such as after device restart, I want to launch background code but not render UI. From documentation, looks like cordova-plugin-background-app can enable me tell how the app was launched but I can’t find a way to use that plugin in Ionic 2.

Any ideas?

What does that mean exactly?

Could you link that documentation please?

Here is the documentation

What I’m looking for is to achieve functionality similar to what cordova.backgroundapp.resumeType offers as given in the documentation.

In my scenario, I have set the app to automatically start if the device was restarted. So I want to distinguish between when the app is started automatically and when it’s the user who launched the app.

The scenario where the app is started automatically is what I’m calling ‘programmatically’.

Ok. What platform are we talking about?

I’d like to use Android platform