title: get the package name of the application that is calling my app
body: <p>I am developing an application in android that create folders and stored files and images in these folders. Each folder have a list that contains the name of applications that are permitted to access these files and image. my question is what is the code that can give me the package name of the application that is accessing my app in order to compare it with the names of apps in the list of each folder. I succeed in getting the package name when the case is that other application retrieve data from my application (startActivityForResult). but i cant get the package name when the case is just view (startActivity)!!! I need to know the package name in both case. any help? </p>