Once the Application has been created, AndroidManifest.xml is again consulted to find the class name of the activity/service/etc. to launch. For example, the /manifest/application/activity/@android:name attribute is used to determine the name of an Activity to load. For Activities, this type must inherit android.app.Activity, and once the type is loaded the Activity.onCreate(Bundle) method will be invoked; Activity.onCreate(Bundle) is, conceptually, the classic Main() entrypoint method going by a different mechanism.
Android.App.Activity is the equivalent activity base class for managed code, and the Activity.OnCreate(Bundle) method is invoked during activity startup.
This works via the Android Callable Wrapper generated by monodroid.exe during the build process the name of the Android Callable Wrapper name is placed into the /manifest/application/activity/@android:name attribute value within AndroidManifest.xml.
Thus, Android loads and runs the Android Callable Wrapper (ACW), which in turn registers the ACW with the corresponding managed type before invoking the native method, transferring control to the overriden Android.OnCreate() method in managed code.
0 件のコメント:
コメントを投稿