Hi i\'m launching activity from preferences screen. Activity is shared among three preferences. I wonder if i can set extras for this activity in xml
To send email or rate on market you need to use something like
<Preference
android:title="@string/title_intent_preference"
android:summary="@string/summary_intent_preference">
<intent android:action="android.intent.action.VIEW"
android:data="market://details?id=com.your_package" />
</Preference>
<Preference
android:title="@string/title_intent_preference"
android:summary="@string/summary_intent_preference">
<intent android:action="android.intent.action.VIEW"
android:data="mailto:your_email@gmail.com" />
</Preference>
There is a data field for intents described in the documentation here.
It is used in the API demo application for the XML preferences to launch an intent in the Intent Preferences example.
Related example xml from that demo in preferences.xml:
<PreferenceScreen
android:title="@string/title_intent_preference"
android:summary="@string/summary_intent_preference">
<intent android:action="android.intent.action.VIEW"
android:data="http://www.android.com" />
</PreferenceScreen>
Maybe this approach could work for you?