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

  • Home
  • SEARCH
  • 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 3353652
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:10:38+00:00 2026-05-18T02:10:38+00:00

I am trying to learn a few things from http://code.google.com/p/iosched/source/checkout . I wanted to

  • 0

I am trying to learn a few things from http://code.google.com/p/iosched/source/checkout. I wanted to see how they implemented that UI patterns they were talking about on the I/O.

In the HomeActivity they use this code to fire up the NotesActivity :

/* Launch list of notes user has taken*/
public void onNotesClick(View v) {  
    startActivity(new Intent(Intent.ACTION_VIEW, Notes.CONTENT_URI));
}

Notes class is in the ScheduleContract class and it looks like :

public static class Notes implements NotesColumns, BaseColumns {
    public static final Uri CONTENT_URI =
            BASE_CONTENT_URI.buildUpon().appendPath(PATH_NOTES).build();
    public static final Uri CONTENT_EXPORT_URI =
            CONTENT_URI.buildUpon().appendPath(PATH_EXPORT).build();

    /** {@link Sessions#SESSION_ID} that this note references. */
    public static final String SESSION_ID = "session_id";

    /** Default "ORDER BY" clause. */
    public static final String DEFAULT_SORT = NotesColumns.NOTE_TIME + " DESC";

    public static final String CONTENT_TYPE =
            "vnd.android.cursor.dir/vnd.iosched.note";
    public static final String CONTENT_ITEM_TYPE =
            "vnd.android.cursor.item/vnd.iosched.note";

    public static Uri buildNoteUri(long noteId) {
        return ContentUris.withAppendedId(CONTENT_URI, noteId);
    }

    public static long getNoteId(Uri uri) {
        return ContentUris.parseId(uri);
    }
}

I cant see what exactly this code do, and how it ends up starting NotesActivity with notes loaded in. I also dont understand how and for what is URI used as a second parameter in new :
Intent(Intent.ACTION_VIEW, Notes.CONTENT_URI).
I searched on Google for explanation but failed to find simple one and simple examples. I would guess that Notes class is used to point to and format the data (notes) and then somehow NotesActivity is started, but dont understand exactly how.

  • 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-18T02:10:39+00:00Added an answer on May 18, 2026 at 2:10 am

    In Android you never launch a specific application, at least not directly. What you do, is that you create an Intent, which is an abstract description of an operation to be performed:

    An Intent provides a facility for
    performing late runtime binding
    between the code in different
    applications. Its most significant use
    is in the launching of activities,
    where it can be thought of as the glue
    between activities. It is basically a
    passive data structure holding an
    abstract description of an action to
    be performed. The primary pieces of
    information in an intent are:

    • action — The general action to
      be performed, such as
      ACTION_VIEW, ACTION_EDIT,
      ACTION_MAIN, etc.

    • data — The data to operate on,
      such as a person record in the
      contacts database, expressed as a
      Uri.

    Whenever you want to launch another application, send a text message, pick a contact, activate the camera etc, you just create and start an Intent, and then Android figures out by itself what application it should launch.

    So for your example with the Notes activity:

    startActivity(new Intent(Intent.ACTION_VIEW, Notes.CONTENT_URI));
    

    The first parameter, Intent.ACTION_VIEW, tells that this Intetwill display something to the user. The second parameter, Notes.CONTENT_URI, is the Uniform Resource Identifier for the Notes activity (in your example, the URI can also include an ID if you want to open the activity with a specific note). The result is that the Notes activity is displayed for the user.

    If you need more information, I suggest reading about Android Application Fundamentals and Intents and Intent Filters, which explain these concepts in detail

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For the past few weeks, I've been trying to learn about just how email
I have been trying to learn Java for the past few days so my
Trying to learn a bit of CSS and I want a horizontal navbar and
In trying to learn how to create objects in ActionScript, I have had no
I'm trying to learn C. As a C# developer, my IDE is Visual Studio.
I am trying to learn the keyboard shortcuts in Visual Studio in order to
I'm trying to learn RegEx in Ruby, based on what I'm reading in The
I'm trying to learn C++ so forgive me if this question demonstrates a lack
I am trying to learn some of the basic and advanced features of visual
I'm trying to learn to use SDL for a little game I'm writing ,

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.