According to documentation AliasActivity stub can be used for choosing which activity to start. AliasActivity is just ordinar activity, what it does is just parse android.app.alias
tag to use xml file for start the activity. In android manifest file it can be used like:
<activity
android:name="android.app.AliasActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.alias"
android:resource="@xml/alias" />
</activity>
After searching I've found that alias.xml may looks like:
<?xml version="1.0" encoding="utf-8"?>
<alias xmlns:android="http://schemas.android.com/apk/res/android">
<intent
android:targetPackage="com.example.aliasexample"
android:targetClass="com.example.aliasexample.MainActivity"
android:data="http://www.google-shmoogle.com/">
</intent>
</alias>
So how to use AliasActivity. I am not just finding the solution, I want to find elegant one, and trying to use for that AliasActivity. For example, I should start one activity in case of some shared preference set and another one if not set. Is it possible to use AliasActivity for that or it can be just used for some device-specific characteristics, that we specify in xml? So what is the reason of using AliasActivity?
And second question is can I get access to some sharedPreference value directly in xml?