The Mobile applications designed for Android frequently have access to private information and resources stored on the user's device. The improper use of this data by malicious programs has the potential to result in breaches of privacy as well as the disclosure of sensitive data. An example of this would be a malicious application capturing a confidential business chat in the background without the user's knowledge. The issue is caused by the fact that Android users do not have control over the capabilities of programs once those applications have been granted the desired access during installation. This is what causes the problem. It is necessary for us to have a context-based access control mechanism so that privileges can be dynamically provided or revoked to applications based on the specific context of the user. This is because there are numerous situations in which the possibility that an application will be allowed a privilege is contingent on the specific context of the user. In this article, we suggest an access control system along these lines. Our implementation of context distinguishes between subareas that are geographically adjacent to one another within the same location. We have made certain changes to the Android operating system in order to enable context-based access control limitations, which can then be set and implemented. We have carried out a number of tests in order to evaluate both the efficacy of our access control mechanism and the precision of context recognition.