Introduction Android has a robust Access control system. If an Android app needs to use resources or information outside of its own scope, the app has to request the appropriate permission . It needs to get permissions before accessing critical resources like Camera, Location, Contacts etc. On Android 6.0 (Marshmallow) or higher, the app needs to request these permissions at runtime by showing a dialog box to the user. Also, the user will have an option to revoke these permissions for that app at any time in future. But, in this article, I would like to point out a few resources that an app can access without any permission s and this might raise a serious privacy concern for the user. Privacy Concerns An app can fetch a list of all other apps installed on your phone. An app doesn't need to request any permissions from you to get a list of all the apps installed on your phone. For example, a Netflix app can get to know wh...
Note: a few of the content of this post is taken from this StackOverflow answer. Context Context is a very important concept and you will be using it throughout your application. It is an abstract Java class defined as public abstract class Context extends Object by the Android system. What is Context? Context represents a handle to get environment data . Context class itself is declared as abstract, whose implementation is provided by the android OS. Context is like remote of a TV & channels in the television are resources, services, etc. Just keep in mind that Context contains the current state of the application/object. It lets newly-created objects understand what has been going on. How to get the Context? Ways to get context : this (inside a Service, Activity or any other class that directly or indirectly extends Context ) getApplicationContext() getContext() getBaseContext() What can you do with it ? Loading resource. this.getResources() in...