Bee Torika
Newbie
Hi ,
Why activity class should (usually) be Public class? (Android)
Because public class can be accessible from other package.
And other package usually means other application, right?
Then, why activities allow other application's accesses ?
It looks not good for security.
But so many projects and examples declare activities as public.
Why not default scope?
In default scope, other project can not access the activity and classes in project can access the activity freely.
At least, activity that contains onCreate(Bundle bundle) will be better if it is declared as default scope, right ?
plz tell me what is wrong with my thinking, so that I could know about android much more.
Why activity class should (usually) be Public class? (Android)
Because public class can be accessible from other package.
And other package usually means other application, right?
Then, why activities allow other application's accesses ?
It looks not good for security.
But so many projects and examples declare activities as public.
Why not default scope?
In default scope, other project can not access the activity and classes in project can access the activity freely.
At least, activity that contains onCreate(Bundle bundle) will be better if it is declared as default scope, right ?
plz tell me what is wrong with my thinking, so that I could know about android much more.