How to share data between multiple applications?

I have apps a, b, c and D and I need to share data from those apps, for a specific app (E)

(basically the login data, to do automatic login. How does Messenger, recovering Facebook access data). when opening, it already identifies that I am logged in with facebook and suggests auto-login

This way the app and will only receive the data from the other apps when prompted. I've seen and managed to share data between two applications by SharedPreferences retrieving the package context with createPackageContext. But I have more than these 4 applications, and specifying the context of all apps in the application and is unfeasible.

Wanted to know another way to share this data and do this automatic login.

Author: Jonas Vieira, 2018-03-22