Ionic to perform actions outside the app

Can we make ionic to work outside the app ? like on tapping on screen to perform some action even if the user in another app
or shaking the mobile to perform some action when the user is outside the ionic app…

i guess a big no unless you make your own background ANDROID service (java) to run.

There is a cordov plugin for background service

Yet to play with this plugo