Hi, Thanks for reply, But there are many apps like App Lock, Fast App Lock, Smart App Lock working on same idea. If anyone knows how can I achieve same functionality.
Sohan Badaya On Mon, Sep 17, 2012 at 1:14 PM, Kristopher Micinski <[email protected] > wrote: > You can't do this. Generally it's considered kind of dubious to need > to know when other apps start (i.e., what are you trying to write, an > app that spies on the user?). Presumably you are trying to write some > kind of "helper" app that provides extra system utilities, this is not > really possible easily, and you shouldn't be doing it at the framework > level. There have been some very long debates on this forum as to > whether this is appropriate or not, you can go through the logs (look > for READ_LOG and ICS..) of this forum. > > You can't get notified of when other apps start, and additionally, you > shouldn't be able to find out when other apps start, period. You can, > through a hack, get access to the system logs, and parse them, though > that's not an API, and the permission has gone away with ICS... > > kris > > On Sun, Sep 16, 2012 at 4:04 AM, Sohan badaya <[email protected]> > wrote: > > I want to be notified when any app launch like Calculator, Email etc, > > so I tried below code > > > > #Attempt 1 > > > > <receiver android:name=".ApplicationLaunchReceiver"> > > <intent-filter> > > <action android:name="android.intent.action.MAIN" /> > > <category android:name="android.intent.category.LAUNCHER" /> > > </intent-filter> > > </receiver> > > > > but this code didn't work. then I tried one more code, > > > > #Attempt 2 > > > > <receiver android:name=".CatchBroadcastReceiver" > > > <intent-filter > > > <action android:name="android.intent.action.PACKAGE_ADDED"/> > > <data android:scheme="package" android:path="com.test"/> > > </intent-filter> > > </receiver> > > > > but this code also didn't work. Please let me know what I am doing > wrong. > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > > http://groups.google.com/group/android-developers?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

