mardi 1 avril 2014

Why does a shortcut to a secondary activity opens the main activity while in the background?


Vote count:

0




My app has several activities, one of which has life in its own right, so I made a shortcut to it in the manifest via:



<intent-filter>
<action android:name="android.intent.action.CREATE_SHORTCUT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>


Now I have it in the Widgets zone. This secondary activity now opens when I click the shortcut that I put in my launcher, as I wanted.


However, there is something that does not work as I want: if the main app is working in the background (say, via the home button), clicking the secondary activity shortcut pop-ups the main app, not the secondary activity.


Why is that? Is this the natural behavior? Is there a way to open the secondary activity always, even side by side with the main app?


Thanks!


L.



asked 12 secs ago






Aucun commentaire:

Enregistrer un commentaire