I wrote simple one line to get context of application in android.
There is nothing else except new project with one activity.
I wrote this code in onCreate Method.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Context context = getContext();
}
It asks me to replace getContext with getBaseContext.
Why I can't use only getContext as it is present?