I have an Activity with the following Intent-Filter
<activity
android:name="com.extratexttest.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="text/plain" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
And I am retrieving the String like this from an Intent :
if (getIntent().hasExtra(Intent.EXTRA_TEXT))
{
String strResult = getIntent().getStringExtra(Intent.EXTRA_TEXT);
Log.i("", "Received String : " + strResult);
}
The first time I run the app it works great and I receive the value. However, the next time I do the same action on a different string I get the same result. It seems like its caching the result somewhere. How do I clear the cache?
Edit: This only happens when I go back thru the button "recent task button"...When I press the back button it works great...
Add this to the manifest, under
android:label="@string/app_name"
In the activity, override this method: