Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6907815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:28:56+00:00 2026-05-27T08:28:56+00:00

In the Android SampleSyncAdapter there is the following piece of code: /** * Adds

  • 0

In the Android SampleSyncAdapter there is the following piece of code:

/**
 * Adds a profile action
 *
 * @param userId the userId of the sample SyncAdapter user object
 * @return instance of ContactOperations
 */
public ContactOperations addProfileAction(long userId) {
    mValues.clear();
    if (userId != 0) {
        mValues.put(SampleSyncAdapterColumns.DATA_PID, userId);
        mValues.put(SampleSyncAdapterColumns.DATA_SUMMARY, mContext
            .getString(R.string.syncadapter_profile_action));
        mValues.put(SampleSyncAdapterColumns.DATA_DETAIL, mContext
            .getString(R.string.view_profile));
        mValues.put(Data.MIMETYPE, SampleSyncAdapterColumns.MIME_PROFILE);
        addInsertOp();
    }
    return this;
}

I added this as filter for my activity

    <intent-filter>
        <action android:name="@string/syncadapter_profile_action" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="vnd.android.cursor.item/vnd.myapp.profile"
            android:host="contacts" />
     </intent-filter>  

where SampleSyncAdapterColumns.MIME_PROFILE = vnd.android.cursor.item/vnd.myapp.profile

I added a contact and I can see the entry but when I click on it nothing happens. What should I do to start an activity when the user clicks on it?
I was trying to do what is suggested Here for Pre-honeycomb devices: The trick is to insert a data row, “Edit in MyApp”, which would take the user to your app and your app
would then provide an editor activity

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:28:57+00:00Added an answer on May 27, 2026 at 8:28 am

    I think your intent filter might be incorrect. According to this entry, the correct action and data items should be something like the following:

    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="vnd.android.cursor.item/vnd.myapp.profile" />
    </intent-filter>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am following the SampleSyncAdapter and upon startup, it appears that my SyncAdapter is
I've been reading the sample code from the dev docs on Android's site, specifically
Android: I am using following code to insert image into album According to description
Android Code Style Guide defines Android Code Style Rules. To conform to these rules
When android unbind a service I created (service.MyService), I see the following DeadObjectException. Can
Android applications can specify intent-priority. How does android handle security situation such as following.
Android action bar compat Is it possible? On older devices (pre 3.0) the items
Android doesn't appear to provide a way for a user application to change the
Android APK-Files are not binaries but byte-code-files. So is it possible to install the
Android SDK since release of API v. 11 contains XmlAdapter sample which is also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.