-
Notifications
You must be signed in to change notification settings - Fork 1
Initialize
You implemented an application with ASAP/Shark. Your application needs an object reference to a ASAPeer or even better a SharkPeer. That’s a mandatory initialization step in every Android ASAP application. This step is required during any application launch.
Applications can also write permanent information during first initialization. You application might ask users to give themselves a name, an id or something like that. Those data can be stored with shared preferences, a database or something else.
We have two kind of initialization.
- during application installation
- during each application launch
You implemented an application with ASAP/Shark. Your application needs an object reference to a ASAPeer or even better a SharkPeer. That’s a mandatory initialization step in every Android ASAP application. This step is required during any application launch.
Applications can also write permanent information during first initialization. You application might ask users to give themselves a name, an id or something like that. Those data can be stored with shared preferences, a database or something else.
We have two kind of initialization.
- during application installation
- during each application launch
Launching is system is often called bootstrepping. Those processes have the tendency to become pretty weird. You know what I mean if you ever had a look into launching code of an operating system. The following will not be that mind-blowing.
Here is the point: There is a special Activity in each Android application. It is the first Activity that is instantiated during application launch. It is defined in the manifest, like this.
<activity android:name=".sharknet.android.InitActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>