What is intent and pendingintent in android?
what actually is a inflator?
what is gradle?
what is android sandbox?
Ans-Android has another layer of protection in that it doesn’t give one app access to the resource of another app. This is known as the ‘sandbox’ where every app gets to play in its own sandbox and can’t use another app’s toys! Android does this by giving each app a unique user id (a UID) and by running that app as a separate process with that UID. Only processes with the same UIDs can share resources which, as each ID is uniquely assigned, means that no other apps have permission.
How is an intent created?
Ans- Intent i= new Intent(from, to);
eg Intent i = new Intent(MainActivity.this, to class where we want to go);
MainaActivity.this is used whenever we are in a inner class
what is bundle?
bundle in android is like a basket, it can hold datas like string n all ,
can also be compared to a map , where its holds data as key value pair.
and we can always put extras with out intent and that extras can also be a bundle,
and that can be extracted in the new acctivity.
when we start an activity for result and the other class has to manually send result to the previous class
in the new class
set the intent
if there is any bundle to set up then complete that
attach it with the intent using putExtras
now comes the setResult
setResult(RESULT_OK,Intent variable)// the RESULT_OK tells that everything is ok
now call finish()
q.
why does everything saved goes back to default when we change the layout from potrait to landscape and vice versa?
what actually is a inflator?
what is gradle?
what is android sandbox?
Ans-Android has another layer of protection in that it doesn’t give one app access to the resource of another app. This is known as the ‘sandbox’ where every app gets to play in its own sandbox and can’t use another app’s toys! Android does this by giving each app a unique user id (a UID) and by running that app as a separate process with that UID. Only processes with the same UIDs can share resources which, as each ID is uniquely assigned, means that no other apps have permission.
How is an intent created?
Ans- Intent i= new Intent(from, to);
eg Intent i = new Intent(MainActivity.this, to class where we want to go);
MainaActivity.this is used whenever we are in a inner class
what is bundle?
bundle in android is like a basket, it can hold datas like string n all ,
can also be compared to a map , where its holds data as key value pair.
and we can always put extras with out intent and that extras can also be a bundle,
and that can be extracted in the new acctivity.
when we start an activity for result and the other class has to manually send result to the previous class
in the new class
set the intent
if there is any bundle to set up then complete that
attach it with the intent using putExtras
now comes the setResult
setResult(RESULT_OK,Intent variable)// the RESULT_OK tells that everything is ok
now call finish()
q.
why does everything saved goes back to default when we change the layout from potrait to landscape and vice versa?
No comments:
Post a Comment