I've been looking into a way for my forward-locked app to be able to
tell, programmatically, whether it has been downloaded from the
Market, or if it was installed to the device by other means.  I think
the app AppManager can do this with forward-locked apps from the
Market (it lists them as "protected"), but I'm not sure how.

My theory is that it looks at two fields in ApplicationInfo (which can
be fetched from PackageManager) called "sourceDir" and
"publicSourceDir".  I found the following description in the SDK:

"[publicSourceDir is the] Full path to the location of the publicly
available parts of this package (i.e. the resources and manifest). For
non-forward-locked apps this will be the same as sourceDir."

Is it possible that I can use the values of sourceDir and
publicSourceDir to have the app determine whether it is forward-
locked, and downloaded from the Market?  Please let me know any
thoughts you guys have on this, thanks!

-Zack

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to