Broadcast/notify/messege when app is launched

by jw » Thu, 18 Feb 2010 23:59:39 GMT


Sponsored Links
 Hi,

Is there a way of getting broadcasted/notified/messeged when a certain
app is launched? I've searched a lot and come up with nothing. I can't
find any support for this in the Android SDK.

Does anybody now if the SDK support this?

If not, is it possible to reach this down under the SDK, using the
NDK?

Thanks in advance.

--



Other Threads

1. ACTION_BOOT_COMPLETED

Hello,

I'm new to Android. I'm trying to use the intent
android.content.Intent.ACTION_BOOT_COMPLETED in order to start a
activity/service as soon as the device is booted.The intent filter is
as below

<receiver android:name="My2Receiver" android:enabled="true">
            <intent-filter>
                <action
android:name="android.content.Intent.ACTION_BOOT_COMPLETED"/>
                <category android:name="android.intent.category.HOME"/>
            </intent-filter>
        </receiver>

Also the following is the code in My2Receiver

public void onReceive(Context context,Intent intent) {
                Log.d("DEBUG","BOOT COMPLETED");
                Intent myStarterIntent = new Intent(context, Hello.class);
        /* Set the Launch-Flag to the Intent. */
        myStarterIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        /* Send the Intent to the OS. */
        context.startActivity(myStarterIntent);
        }

But I do not see any debug messages like BOOT COMPLETED.

Target Version - Android 1.6 API Level 4.

Could anyone please help me know where I'm going wrong here.

-- 

2. android.intent.action.ANSWER

I am using android.intent.action.ANSWER for receiving my call
(android_OS). below i m giving code segment i used:

in android manifest file i wrote
 <intent-filter>
        <action  android:name="android.intent.action.ANSWER" />
        <category  android:name="android.intent.category.DEFAULT" />
  </intent-filter>

in activity class i wrote

 try
       {
          // answer the phone
          Intent myIntent = new Intent(Intent.ACTION_ANSWER);
          myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP
                | Intent.FLAG_DEBUG_LOG_RESOLUTION
                | Intent.FLAG_FROM_BACKGROUND
                | Intent.FLAG_ACTIVITY_NEW_TASK);
          ftaContext.startActivity(myIntent);
       }
       catch (Exception e)
       {
          cleanup();
          return;
       }

But i did not get any result. Please see my code and give me a
feedback asap.

-- 

3. Tanya market nexus one yang lewat singapura

4. Android 2.1 sdk AudioManager could not control Email notifications

5. Update: WTS Nexus One BNIB, tinggal 1pc!

6. Android + C++

7. Menu stk N1