On Sunday, May 15, 2011 7:31:01 PM UTC-4, Brill Pappin wrote:
>
> I've got a situation where we had set our apk to install to location 
> preferExternal but have found that is causes problems.
>
> We want to notify the user if they have the apk installed on the SD card 
> and ask them to move it to the phone if they are experiencing problems.
>
> How do we determine if the app is installed on the SD card or internal 
> memory?
>

I don't know if there's an official way.  

The following is a bit of a hack but may work some of the time: read 
/proc/self/maps as text file and look as the path of the entry that is an 
apk file (though probably not precisely the same name as your pre-install 
apk has).  

If exploring manually from the adb shell to try the idea, substitute the pid 
of your running activity (from 'ps') in place of self, ie /proc/2143/maps

BUT, I don't see how you are going to deploy the code to do this on the 
users device without getting them to update the application (or install an 
additional one), and if updating the application, can you just set the new 
version to no longer allow sd card install?

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