Can somebody explain this to me please :
Intent intent = new Intent(Context, AlarmReceiver.class);
I never understood and I seriously think I never will if somebody doesn't try to explain this to me in depth. This whole context thing is so confusing to me. Sometimes it works like this :
Intent intent = new Intent(getBaseContext(), AlarmReceiver.class);
Sometimes it wont work like that but it accepts only :
Intent intent = new Intent(context, AlarmReceiver.class);
Sometimes its :
Intent intent = new Intent(this, AlarmReceiver.class);
etc. etc. and many other.
I understand basics of context but how many are there? And why does eclipse throw me an error once and another time its fine? Why do we need to declare context sometimes? :
Context context;
I'm unable to find the right context for all situations how do I know what is the right one in every situation?