Both could work. The API could be permission based. E.g. without consent the app would always see itself as in focus.