Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Android Studio Cookbook

You're reading from   Android Studio Cookbook Design, test, and debug your apps using Android Studio

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781785286186
Length 232 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
 van Drongelen van Drongelen
Author Profile Icon van Drongelen
van Drongelen
Arrow right icon
View More author details
Toc

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, and click on the OK button.

  2. Select Phone and tablet and click on the Next button.

  3. Choose Blank Activity and click on the Next button.

  4. Accept all values in the Customize the activity view and click on the Finish button.

  5. Open the AndroidManifest...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images