tags:

views:

18

answers:

1

Can the global Android Application object, which is obtained via getApplication(), implement an AIDL callback interface and communicate with remote services? Also, can it launch Activities and send intents?

From my understanding, the operations above are typically reserved for Android app components: activities, services, and content providers. Thus I am not sure if an Application object can perform these as well.

A: 

Not sure if you already know, but you can define your own entry point, aka the Application by extending the Application class. Also you need to tell in manifest the name of the class that will act as Application.

<application
    android:icon="@drawable/icon"
    android:label="@string/app_name"
    android:name=".MyApplicationClass"
    android:debuggable="true">

And since now you are in charge of your MyApplicationClass you can do those things as well.

Pentium10
I am aware that we can create custom a Application object. My question was more geared towards whether it's appropriate for this Application object to perform operations that are typically done by Activities, Services, and ContentProviders.
zer0stimulus