I'm writing an app similar to app protector - it prompts the user to
authenticate himself when a protected app is launched. Since Android
doesn't provide a way to use BroadcastReceiver on explicit intents,
I'm detecting app launches by monitoring logcat. For most apps, I'm
listening for something like "Starting activity..." and then throwing
an intent to my own authentication activity.

However, there seems to be a loophole in this when a protected app A
is launched via another App B. App A is only launched once(and hence
will only have one "Starting activity..." entry in logcat, and if I
switch to App B from my activity, it will re-route to App A, and this
time, I won't be able to detect it since logcat doesn't show its
launch.

An example would be package installer being a protected app, and a
file manager launching package installer upon tapping an apk file.
While my authentication activity is called up the first time, if I
switch to the file manager again, it will automatically display
package installer, and this time my app doesn't detect it.

I've tried a few app protector apps such as App Protector Lite and
Smart App Protector, and they don't seem to have this problem. They
have similar permissions as well - GET_TASKS, READ_LOGS,
RECEIVE_BOOT_COMPLETED, and SYSTEM_ALERT_WINDOW. Does anyone know what
can be done to solve my problem?

Thanks.

-- 
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

Reply via email to