android - App started with a custom url scheme does not appear in recent apps list -


when app started custom url scheme not appear in "recent apps" list (appears on holding home button).

example:

  1. i start app link in sms. app launches. ok.
  2. then press home button , go home screen. still ok.
  3. then hold home button , list of recent apps appears. app not on list. in not ok - expect app on list.
  4. if select messaging app list app comes up. not ok. expect see messaging app instead.

androidmanifest.xml:

<activity android:name=".mainactivity"               android:screenorientation="portrait">    <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.view"/>     <category android:name="android.intent.category.default"/>     <category android:name="android.intent.category.browsable"/>     <data android:host="myhost.com" android:scheme="http" android:pathpattern="/y.*"/>   </intent-filter>  </activity> 

i believe what's happening activity being launched affinity task (application) launched it, rather launching new task (your application).

try setting launchmode of activity singleinstance (the default standard).

i.e.:

<activity android:name=".mainactivity"           android:screenorientation="portrait"           android:launchmode="singleinstance"> 

(note: check above linked launchmode documentation may prefer singletask on singleinstance depending on trying achieve application.)


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -