On Wed, Aug 22, 2012 at 9:23 AM, user123 <[email protected]> wrote:
> I want to detect exactly when the user says, hey, let's open the app, and
> taps on the app's icon, not anything else. Is this hard to understand?

        @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                Intent intent = getIntent();
                boolean fromLauncher = savedInstanceState == null &&
                                Intent.ACTION_MAIN.equals(intent.getAction()) &&
                                
intent.getCategories().contains(Intent.CATEGORY_LAUNCHER);

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to