How do I determine if an activity is being launched from a back navigation versus being launched by the user in Android? -


the home screen of app needs have different behavior when app being launched outside app versus when navigation occurs. example, imagine android twitter client on launch tries updated feed when click on item hit detail page , hit back, screen doesn't reload new feeds instead left from.

so far i've tried looking @ calling package property hasn't helped since seems null both when app launched user first time or when hit detail page.

when user launches first time, oncreate() onresume() called sure. when navigating , getting activity backstack, onresume called.

also if activity has singletop set, can onnewintent() called when navigate activity other screens.

so, solution can suggest set singletop activity. while navigating using onnewintent(). 1st time launch oncreate() called.

sorry if not understand question well..


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -