If you read Google's documentation about content providers, you will notice that a content provider basically is intended to supply data from one application to others on request. Such requests are handled by the methods of the ContentResolver
class.
We will create a new app that will read our daily thoughts from the other one.
For this recipe, you need to have completed the previous one successfully. Make sure you have added some thoughts to your app as well or there'll be nothing to read otherwise, as Captain Obvious could tell us.
First we will create a new app. It is going to read our thoughts. That's for sure!
Create a new project in Android Studio, name it
DailyAnalytics
, and click on the OK button.Select Phone and tablet and click on the Next button.
Choose Blank Activity and click on the Next button.
Accept all values in the Customize the activity view and click on the Finish button.
Open the
AndroidManifest...