Blog purpose for android basic example for android app developer. any query please my contact

Saturday 4 March 2023

what is context in android

 what is context in android


A Context is a handle to the system; It provides services like resolving resources, getting access to databases and preferences, etc. An Android app consists of activities. Context is like a handle to the environment in which your application is currently running.



What is Context and intent in Android?

context. startActivity(new Intent(context, ActivityClass. class)); This call to startActivity sends the Intent to the Android system, which is then in charge of creating and opening the activity that you have specified.


Looking at this definition we come across two things:


The Context tells us about the surrounding information.

It is very important to understand the environment which we want to understand.

No comments:

Post a Comment