简体   繁体   中英

Android application with two entry points. How to know which is clicked by user on onCreate() of application object

I have a android application with two entry points. ie I have two icon on home screen but internally they are single application.

I want to know how i can set some parameter in Application object depending on the icon click.

More precisely, I want to maintain a scope variable which will keep information of the scope of my application based on what icon user has clicked. Based on this my common screens will behave differently for both of this entry points.

Application has getApplicationInfo() and ApplicationInfo has loadIcon(PackageManager pm) - Retrieve the current graphical icon associated with this item. Is it enough?

I think also that getPackageName() could be used, too, but the author should use different names for both variants of application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM