第一种:直接通过包名:

Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.joyodream.jiji");
startActivity(LaunchIntent);

 

第二种:通过自定义的Action

Intent intent = new Intent();
intent.setAction("com.joyodream.jiji.main");
MainActivity.this.startActivity(intent); <intent-filter>
<action android:name="com.joyodream.jiji.main" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

第三种:通过Scheme

Intent intent = new Intent();
intent.setData(Uri.parse("joyodream://......"));
startActivity(intent); <intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="joyodream" android:ssp="jiji" />
</intent-filter>

  

外部程序启动App的更多相关文章

  1. [Android]从Launcher开始启动App流程源码分析

    以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/5017056.html 从Launcher开始启动App流程源码 ...

  2. ActivityManagerService是如何启动app

    ActivityManagerService是如何启动app 一.      上一篇文章app的启动过程,说明了launcher启动app是通过binber,让ActivityManagerServi ...

  3. Appium学习路—脚本篇(启动app)

    启动之前的准备   1.脚本执行前,需要先启动appium的server端, 启动server方法: 打开appium客户端,点击右上角的Launch     2.iOS的测试只能在mac本上做   ...

  4. Android Launcher分析和修改9——Launcher启动APP流程

    本来想分析AppsCustomizePagedView类,不过今天突然接到一个临时任务.客户反馈说机器界面的图标很难点击启动程序,经常点击了没有反应,Boss说要优先解决这问题.没办法,只能看看是怎么 ...

  5. Android 启动APP黑屏解决方案

    #Android 启动APP黑屏解决方案# 1.自定义Theme //1.设置背景图Theme <style name="Theme.AppStartLoad" parent ...

  6. Android在浏览器启动APP

    要想在浏览器启动APP的方法例如以下: 在须要跳转的ACTIVITY中加入intent-filter的相关信息: <intent-filter>     <data android: ...

  7. ele.me在IOS浏览器端启动APP的技巧分析

    ele.me在IOS浏览器端启动APP的技巧分析 巧妙利用后台重定向,在schemes启动时提示用户打开,启动不了APP时能够及时跳转至下载页面. 避免报错页面的出现以及用户还没来的及选择就跳转到下载 ...

  8. appium+Python 启动app(二)

    我们上步操作基本完成,下面介绍编写Python脚本启动app 打开我们pycharm新建.py文件 第一步:输入Python脚本代码: #coding=utf-8 from appium import ...

  9. appium+Python 启动app(一)

    当我们appium和Python环境都配置好了,如何启动我们第一个app呢?下面介绍appium+Python启动app的操作步骤,为了能够详细查看,我们这里使用夜游神模拟器进行示范. 测试项目:QQ ...

随机推荐

  1. weblogic11g重置账户

    weblogic重置用户名密码 00.备份域下的认证文件 备份%DOMAIN_HOME%/security/DefaultAuthenticatorInit.ldift  #当前的默认密码认证 01. ...

  2. weblogic10.3.6打补丁PSU

    weblogic的补丁,非付费不能下载... Oracle WebLogic Server Patch Set Update 10.3.6.0.170418 PATCH_ID - RVBS    #补 ...

  3. JS正则替换掉小括号及内容

    正則表達式:\ ( [ ^ \ ) ] * \ ) JS代码: var str="hello(world)"; var nstr = str.replace(/\([^\)]*\) ...

  4. Easyui入门视频教程 第05集---Easyui复杂布局

    目录 ----------------------- Easyui入门视频教程 第09集---登录完善 图标自定义   Easyui入门视频教程 第08集---登录实现 ajax button的使用  ...

  5. shell脚本npm构建静态文件

    #!/bin/bash cd /data/web source /etc/profile /usr/bin/cnpm i && npm run build cp -r ./dist/* ...

  6. JSONObject.parseObject(jsonStr);和JSONObject.fromObject(jsonStr);

    虽然都是返回JSONObject,但是 JSONObject.parseObject(jsonStr);这个方法需要导入import com.alibaba.fastjson.JSONObject; ...

  7. 【DM】Combating Web Spam with TrustRank - 用TrustRank对抗网络垃圾邮件

    [论文标题]Combating Web Spam with TrustRank (Proceedings 2004 VLDB Conference) [论文作者]Zolt´an Gy¨ongyi,He ...

  8. iOS 10 的一个重要更新-用 UIViewPropertyAnimator 编写动画

    曾经的黑暗年代 用基于 block 的 UIView animation 来编写 view 属性(frame, transform 等等)变化的动画非常简单.只需要短短几行代码: view.alpha ...

  9. Install MySQL 5.7 on Fedora 25/24, CentOS/RHEL 7.3/6.8/5.11

    MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user ...

  10. k8s之服务发现

    一.概述 k8s中支持两种服务发现方法: 环境变量和DNS 二.环境变量 当Pod被创建的时候,k8s将为Pod设置每一个Service的相关环境变量,这些环境变量包括两种类型: k8s Servic ...