Many of the first-entry Android Web pages may not know what the Android program entry point is, not main (), of course, I believe that the reply oncreate is not a literal mistake, but you are thinking of the activity of the OnCreate method, Actually the real entry point entrypoint is what.
Android uses a Google Dalvik VM, which differs greatly from traditional Java VMs in that the entry point in Sun's Java system is main () as in the standard C language, and each Android program contains a application instance. There are multiple activity, Service, ContentProvider, or broadcast Receiver in a application instance. Because most applications contain activity, it is said that many people think it is the activity of the OnCreate, but you do not find that your project has a number of activity? You may not have seen an Android app without activity.
In fact, in android.app.Application this package oncreate is the real Android entry point, but most developers do not have to rewrite the class, his inheritance relationship such as:
Java.lang.Object
? Android.content.Context
? Android.content.ContextWrapper
? Android.app.Application
The Android.app.Application class contains 4 public methods
void onconfigurationchanged (Configuration newconfig)
void OnCreate ()//This is the real entry point.
void Onlowmemory ()
void Onterminate ()
So the real Android entry point is application's main, you can see the androidmanifest.xml of the inclusion of the relationship is clear, not every application must have activity.
What is the entry point of the Android program, not main ()?