Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By kjkrum

Thread: Context parameter for an Intent constructor

  1. #1
    Nazneen Ali is offline Senior Member
    Join Date
    Jul 2011
    Posts
    112
    Rep Power
    0

    Default Context parameter for an Intent constructor

    I am completely new to android development. In fact, I am building my first application after the hello world application, following this tutorial: Starting Another Activity | Android Developers
    and I have come accross the term Context for the first time. I have opened the API for the class but the description (given as follows) given there is not understandable for me at all.

    "Interface to global information about an application environment. This is an abstract class whose implementation is provided by the Android system. It allows access to application-specific resources and classes, as well as up-calls for application-level operations such as launching activities, broadcasting and receiving intents, etc."

    Can somebody tell me in the simplest terms ever what a context is. Please tell something a complete beginner can understand.
    Last edited by Nazneen Ali; 11-02-2013 at 03:53 PM. Reason: removed a question i have found an answer to
    Don't forget to smile :-)

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Context parameter for an Intent constructor

    Under the hood, Android is Linux. By default, every app is set up as its own user on the Linux system. Linux has per-user file and system access rules. The Context identifies the app (the user) so access rules can be applied. I think Activity Contexts also carry some information about the graphics surface the app is currently allowed to draw on.
    Nazneen Ali likes this.
    Get in the habit of using standard Java naming conventions!

  3. #3
    Nazneen Ali is offline Senior Member
    Join Date
    Jul 2011
    Posts
    112
    Rep Power
    0

    Default Re: Context parameter for an Intent constructor

    Thank you!
    Don't forget to smile :-)

Similar Threads

  1. Intent & action
    By johnsonjp34 in forum Android
    Replies: 4
    Last Post: 11-07-2012, 07:55 PM
  2. Intent & action
    By johnsonjp34 in forum New To Java
    Replies: 0
    Last Post: 11-07-2012, 02:56 AM
  3. Replies: 10
    Last Post: 09-03-2012, 08:13 PM
  4. Replies: 0
    Last Post: 08-10-2011, 09:41 AM
  5. Replies: 2
    Last Post: 12-19-2008, 02:20 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •