I only have focused on making apps for apps that will be installed on the phone memory.
Is there any way to know dynamically the path of the application package (Environment.get…? or some other flag that can be used)? My concern is if you restore a database you must provide a destination path. That would be different depending on where the application is (sd card versus internal memory).
Are you trying to get the location of the classpath, or of the location of a class itself (classpath + package path)?
To get the location of the classpath, you can do the following:
Boot would be replaced with any class.