Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ah, now I've better understood your question. I don't think that there's any way to get the data you're interested in directly from the local copies of the apps. It's an interesting idea, and reasonable for the speed/space/bandwidth reasons you suggest, but would require significant support from the apps that's not currently available.</p> <p>Trying to avoid the user re-entering their password is also something that would almost certainly <em>still</em> be impossible even if the apps did support sharing local data. After all, how is the GMail app going to verify that your app should have permission to read all of its data? Presumably by prompting for your GMail username and password. Merely being on the same device definitely doesn't imply complete trust.</p> <p>Using a SyncAdapter and storing the authentication token as demonstrated in the sample project, you should be able to limit the user to entering their credentials once, but that's about the best you're going to be able to do.</p> <hr> <p><strong>Previously:</strong></p> <p>Have you had a look at the SampleSyncAdapter included with the SDK?</p> <p><a href="http://developer.android.com/tools/samples/index.html" rel="nofollow">These instructions</a> give a quick overview of how to access the samples.</p> <p>If you're using Eclipse, it's actually even easier then they suggest there. To get the sample project:</p> <ol> <li>Select <code>File</code> > <code>New</code> > <code>Other...</code></li> <li>Choose <code>Android</code> > <code>Android Sample Project</code></li> <li>Choose whichever target/API Level is applicable to your project (probably the latest)</li> <li>Select the sample project you're interested in, SampleSyncAdapter in this case</li> </ol> <p>The sample project is a great example of how to use SyncAdapters and should be readily adaptable to connect with GMail, Facebook, etc.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload