Android(安卓)从app 携带参数 跳转到其他app的指定界面
16lz
2021-01-24
app1 跳转方:
在跳转函数中执行:
Intent intent = new Intent(); intent.setComponent(new ComponentName("com.junrui.yhtd","com.junrui.yhtd.ui.record.MedicalRecordActivity")); //第一个参数为app2的包名,第二个参数为app2的被调转界面activity intent.putExtra("recordId","7398");//携带参数 intent.setAction("MedicalRecordDetail"); //app2中被调转界面的action startActivity(intent);
app2 被跳转方:
在mainfest文件中配置被调转界面
主要是添加action属性,用来过滤。
<activity android:name="com.junrui.yhtd.ui.record.MedicalRecordActivity" android:configChanges="orientation|keyboardHidden|screenSize" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar" android:windowSoftInputMode="adjustResize|stateHidden"> <intent-filter> <action android:name="MedicalRecordDetail"/> intent-filter> activity>
更多相关文章
- C语言函数的递归(上)
- android 类型转换 工具函数
- android Binder机制深入浅出
- android - JNI接口函数 (2)
- Android(安卓)ViewPager分页功能
- Android(安卓)利用viewpager 来实现Frament 有导航条
- Android中把集合显示到listview上
- Android输入法切换引导功能
- Android切换系统语言,自动更新应用界面显示语言