Intents and Activities

by Lovedumplingx » Wed, 11 Mar 2009 03:59:38 GMT


Sponsored Links
 So I'm still working to get the paradigm down.

Activities are related to screens and everything you want a user to
see needs to be part of an activity.  But what's with the Intent?  Are
all intents tied to an activity?

I thought I had read that Intents were more like events.  If that's
the case cool...but I'm really struggling on where Intents fit into
the whole concept.
--~--~---------~--~----~------------~-------~--~----~



Intents and Activities

by Lovedumplingx » Wed, 11 Mar 2009 12:20:23 GMT


 Don't know if this went through last time so I'll post again....


So I'm still working to get the paradigm down.

Activities are related to screens and everything you want a user to
see needs to be part of an activity.  But what's with the Intent?  Are
all intents tied to an activity?

I thought I had read that Intents were more like events.  If that's
the case cool...but I'm really struggling on where Intents fit into
the whole concept.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Intents and Activities

by Lovedumplingx » Wed, 11 Mar 2009 12:20:27 GMT


 Accidentally posted this in the wrong area....


So I'm still working to get the paradigm down.

Activities are related to screens and everything you want a user to
see needs to be part of an activity.  But what's with the Intent?  Are
all intents tied to an activity?

I thought I had read that Intents were more like events.  If that's
the case cool...but I'm really struggling on where Intents fit into
the whole concept.

--~--~---------~--~----~------------~-------~--~----~



Intents and Activities

by Muthu Ramadoss » Wed, 11 Mar 2009 16:04:43 GMT


 Here's my 2 sec tutorial:

Android Component 1:
Activity - the screen.
View - the widgets inside the screen.

Android Component 2:
Service - logic running in background.

Android Component 3:
Content Provider - data storage.

Android Component 4:
Broadcast Receiver - code waiting to be run, triggered by matching intent.

Intent - the trigger to start the above components.


 http://developer.android.com/reference/android/content/Intent.html 


take care,
Muthu Ramadoss.

 http://linkedin.com/in/tellibitz  +91-9840348914
 http://androidrocks.in  - Android Consulting.







--~--~---------~--~----~------------~-------~--~----~



Intents and Activities

by Tseng » Wed, 11 Mar 2009 21:34:25 GMT


 Yea, Intents are kind of events. You can use them to call or
communicate with other Activities or Applications.

And you can add extra data (Intent.putExtra(...)) to send data to
other activities



--~--~---------~--~----~------------~-------~--~----~



Intents and Activities

by Lovedumplingx » Wed, 11 Mar 2009 23:43:53 GMT


 Thanks.  That helps put things in perspective.  I need intents to
start the components and within the components there can be various
other work done etc.




--~--~---------~--~----~------------~-------~--~----~



Intents and Activities

by Muthu Ramadoss » Thu, 12 Mar 2009 19:02:29 GMT


 >> Thanks.  That helps put things in perspective.  I need intents to start
the components and within the components there can be various other work
done etc.


Thats it!

Glad it helped.

take care,
Muthu Ramadoss.

 http://linkedin.com/in/tellibitz  +91-9840348914
 http://androidrocks.in  - Android Consulting.









--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Multiple Instances of PV Player (Open source)

Hi

   The use case is to run two instances of PV Player (default android
player) simultaneously.
   When user leaves the area of the First PVPlayer it should not get
paused.
   The default android behaviour is to pause an foreground activity
when either some other activity
   comes to   foreground or when user leaves the activity area.

   I want to know if this pause can be avoided.
   There is a fucntion in ActivityThread.java where the activity
pause, resume etc is handled.
   will it be a good idea to skip the pause if the activity is what i
am interested in

   also, since in android by default an application is launched full
screen, changes have been made
   to  launch mutiple windows.


1. To launch two PV Players from Image gallery activity,
   I have changed the following code in Imagegallery.java

    public void onImageClicked(int index) {
    ........
           intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_MULTIPLE_TASK |
                                     Intent.FLAG_ACTIVITY_SINGLE_TOP);
    .........
    .........
    }


 2.   3.  In packages/apps/gallery/Androidmanifest.xml  , for the
MovieView activity
     a) the task affinity is set to ""
     b) android:launchMode="standard"


Please let me know, if there is any other way to launch  mutiple
instances of an activity and also if
the activity pause can be avoided , so that I have two videos running
simultaneously

regards
MSK





-- 

2. What exactly is Handler and Loopers in android ?

Hi All,
    Please help me on this
Thanks,
Sagar




-- 

3. Query Google Maps

4. Rotate Image

5. Calendar Widget

6. Investigating for a WebOS style app switcher

7. How to update the AlertDialog