the **onCeate()** is protected so to avoid calling of it from the activity object.
MyActivity activity = new MyActivity();
activity.onCreate(args); // which doesn't make sense because activity is not yet created
Since this method is only called when the activity gets created, calling it yourself will most probably give you a **nullpointerException** because the activity is not yet created. <a href="https://stackoverflow.com/questions/5652661/why-is-oncreate-in-activity-protected">S/O Post</a>
the **onCeate()** is protected so to avoid calling of it from the activity object.
MyActivity activity = new MyActivity();
activity.onCreate(args); // which doesn't make sense because activity is not yet created
Since this method is only called when the activity gets created, calling it yourself will most probably give you a **nullpointerException** because the activity is not yet created.