How does an Android application appear in the system

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

How does an Android application appear in the system

Postby akrk1986 » Tue Dec 09, 2008 11:18 pm

I am trying to understand the mechanism that lets an application manager register a new application so that it will show up in the menus.

I understand that an application receives all kind of events and can also broadcast events. So a new app can declare 'I am active and I am <someapp>'. Then an application manager will receive this broadcast and register the application (if it's the first time ever that it runs). However, this requires that any newly installed application must immediately run in order to 'regsiter' itself. This does not make much sense.

So can anyone explain how does the system become aware of a new application and also when an application is removed? The .apk format does not have any post/pre-install/uninstall scripts, as far as I understand.

Thanks.
-- Amir
akrk1986
Freshman
Freshman
 
Posts: 2
Joined: Tue Dec 09, 2008 11:06 pm
Location: Israel

Top

Postby MrSnowflake » Wed Dec 10, 2008 12:02 pm

[mod]Moved.....

That kind of stuff is in the Manifest! in the Sections intent-filters and such.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Application manager interaction

Postby akrk1986 » Wed Dec 10, 2008 12:24 pm

Following up MrSnowflake's post: I understand that each and every application must create an Intent Filter (or maybe an Intent Receiver) that is responding to a predefined event. That event is something that an application manager broadcasts, something like "Yo! Application, listen up! what is your name?" :-).

Then every installed application gets this intent and responds to it and thus the application manager is able to collect the names of ALL installed applications.

From the documentation it also seems that the application does not to be active - the operating system sends it the broadcast and it wakes up, responds, and exits.

If this is really the way it works, how come this not documented anywhere? If it is, please direct me to the relevant docs.

Thanks,
Amir
-- Amir
akrk1986
Freshman
Freshman
 
Posts: 2
Joined: Tue Dec 09, 2008 11:06 pm
Location: Israel

Top

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests