O'Reilly logo

Android Studio Cookbook by Mike van Drongelen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Communicate with other apps using content providers

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.

Getting ready

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.

How to do it...

First we will create a new app. It is going to read our thoughts. That's for sure!

  1. Create a new project in Android Studio, name it DailyAnalytics ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required