Receive custom intent without activity restart

10min

New Member
I have a \[code\]TextView\[/code\] with some linkification(twitter style):\[code\]Pattern pattern1 = Pattern.compile("@\\w+");Linkify.addLinks(textView, pattern1, "my_activity://one=");Pattern pattern2 = Pattern.compile("#\\w+");Linkify.addLinks(textView, pattern2, "my_activity://two=");\[/code\]Activity declared in manifest with following intent filter:\[code\]<intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="my_activity" /></intent-filter>\[/code\]Intent gets caught in the \[code\]onNewIntent\[/code\] method of the activity but the activity gets restarted before that(I assume this is default behaviour).Is there a way to receive such intent without restarting activity?
 
Back
Top