The first time I installed WSM tools on my phone, I found that WSM was just a simple integration framework that required the tools to be installed separately, and the installation of a tool later found that the icon did not show, it feels amazing, the recent work needs, but also to do the integration between Android applications, it is actually very simple. Only need to provide the application package, activity name to be integrated
For example, to integrate another application in the current application, as in the same application by booting through intent:
1 Public classMainactivityextendsActivity {2 @Override3 protected voidonCreate (Bundle savedinstancestate) {4 Super. OnCreate (savedinstancestate);5 Setcontentview (r.layout.main);6 7Intent Intent =NewIntent ();8 //The package name of the app and the main activity to start9ComponentName componentname =NewComponentName ("Com.xxxx.xxxx", "com.xxxx.xxxx.App"); Ten intent.setcomponent (componentname); One intent.addflags (intent.flag_activity_new_task); AIntent.putextra ("ParamName", "Paramvalue"); - startactivity (intent); - the } -}
If you want the integrated app icon to be hidden, you need to set it in Androidmanifest.xml and modify the Android.intent.category.LAUNCHER to Android.intent.category.DEFAULT
To implement the hidden icons:
<ActivityAndroid:name=". Mainactivity "android:process= "Com.baixd.framework"Android:theme= "@android: Style/theme.notitlebar"Android:label= "@string/app_name"> <Intent-filter> <ActionAndroid:name= "Android.intent.action.MAIN" /> <!--<category android:name= "Android.intent.category.LAUNCHER"/> - <categoryAndroid:name= "Android.intent.category.DEFAULT" /> </Intent-filter></Activity>
Integration between Android Apps