zoukankan      html  css  js  c++  java
  • android 跨应用跳转 启动其他应用指定界面





    //应用 A  跳转到应用B指定界面

    //应用A调转的intent代码

     Intent intent = new Intent();
            ComponentName comp = new ComponentName("com.xxx.xxxx", "com.xxx.xxx.BActivity");
            intent.setComponent(comp);
            intent.putExtra("other", "true");
            intent.setAction("android.intent.action.VIEW");
            startActivity(intent);
    //其中  "com.xxx.xxxx",要跳转到的B应用的包名    
    //   "com.xxx.xxx.BActivity"   B应用的详细路径  
    //  自定义传一个参数,区别B一个用内部应用跳转   


    //  应用B需要在mainifest.xml注册 代码

    <activity
                android:configChanges="orientation|keyboardHidden"
                android:name=".activity.BActivity" >
                <intent-filter >
                    <action android:name="android.intent.action.VIEW"/>
                    <category android:name="android.intent.category.DEFAULT"/>
                </intent-filter>
            </activity><!-- 分类详细列表 -->

    //  其中主要是     <action android:name="android.intent.action.VIEW"/> //固定不变
     //  <category android:name="android.intent.category.DEFAULT"/> //固定不变




  • 相关阅读:
    Docker Get Started VI
    Docker Get Started V
    Docker Get Started III
    Docker Get Started IV
    Docker Get Started II
    Docker Get Started I
    贝叶斯公式
    LRU缓存
    二进制中1的个数
    2.准备工作之Gradle
  • 原文地址:https://www.cnblogs.com/flyingsir/p/3983772.html
Copyright © 2011-2022 走看看