//使用chooserIntent
private void startImplicitActivation() { Log.i(TAG, "Entered startImplicitActivation()"); // TODO - Create a base intent for viewing a URL
// (HINT: second parameter uses Uri.parse())
Uri myUri = Uri.parse(URL);
Intent baseIntent = new Intent(Intent.ACTION_VIEW, myUri);
// TODO - Create a chooser intent, for choosing which Activity
// will carry out the baseIntent
// (HINT: Use the Intent class' createChooser() method)
Intent chooserIntent = Intent.createChooser(baseIntent, "Display this url via .."); Log.i(TAG,"Chooser Intent Action:" + chooserIntent.getAction()); // TODO - Start the chooser Activity, using the chooser intent
startActivity(chooserIntent); }

设置Intent-filter

             <!-- TODO - Add necessary intent filter information so that this
Activity will accept Intents with the
action "android.intent.action.VIEW" and with an "http"
schemed URL -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http"/>
</intent-filter>

android intent filter浏览器应用的设置,如何使用choose-box选择应用的更多相关文章

  1. 【转】Android Intent Action 大全

    String ADD_SHORTCUT_ACTION 动作:在系统中添加一个快捷方式.. “android.intent.action.ADD_SHORTCUT” String ALL_APPS_AC ...

  2. android intent收集转载汇总

    Intent intent = new Intent(Settings.ACTION_WIRELESS_SETTINGS);                 ComponentName comp = ...

  3. Android——Intent动作汇总(转)

    String ADD_SHORTCUT_ACTION 动作:在系统中添加一个快捷方式.. "android.intent.action.ADD_SHORTCUT" String A ...

  4. Android Intent Action 一览表

    String ADD_SHORTCUT_ACTION 动作:在系统中添加一个快捷方式.. "android.intent.action.ADD_SHORTCUT" String A ...

  5. Android Google官方文档(cn)解析之——Intents and Intent filter

    应用程序核心组件中的三个Activity,service,还有broadcast receiver都是通过一个叫做intent的消息激活的.Intent消息传送是在相同或不同的应用程序中的组件之间后运 ...

  6. Android中的Intent Filter匹配规则介绍

    本文主要介绍了隐式Intent匹配目标组件的规则,若有叙述不清晰或是不准确的地方希望大家指出,谢谢大家: ) 1. Intent简介 Intent用于在一个组件(Component,如Activity ...

  7. Android菜鸟的成长笔记(9)——Intent与Intent Filter(下)

    原文:[置顶] Android菜鸟的成长笔记(9)——Intent与Intent Filter(下) 接着上一篇的内容,下面我们再来看看Intent的Data与Type属性. 一.Data属性与Typ ...

  8. Android菜鸟的成长笔记(8)——Intent与Intent Filter(上)

    原文:[置顶] Android菜鸟的成长笔记(8)——Intent与Intent Filter(上) Intent代表了Android应用的启动“意图”,Android应用将会根据Intent来启动指 ...

  9. Android 4 学习(13):Local Broadcast Manager & Intent Filter

    参考<Professional Android 4 Development> Local Broadcast Manager 简介 Local Broadcast Manager由Andr ...

随机推荐

  1. C#类的成员(字段、属性、方法)

    前面定义的Person的类,里面的成员包括:字段.属性.方法.事件等,此外,前面说的嵌套类也是类的成员. a.类的成员为分:静态成员(static)和非静态成员 b.静态成员用static标识,不标识 ...

  2. Scrapy 框架进阶笔记

    上一篇简单了解了scrapy各个模块的功能:Scrapy框架初探 -- Dapianzi卡夫卡 在这篇通过一些实例来深入理解 scrapy 的各个对象以及它们是怎么相互协作的 settings.py ...

  3. 洛谷P3387 缩点模板

    给定一个n个点m条边有向图,每个点有一个权值,求一条路径,使路径经过的点权值之和最大.你只需要求出这个权值和. 允许多次经过一条边或者一个点,但是,重复经过的点,权值只计算一次. 因为可以重复经过点, ...

  4. 洛谷P3792 由乃与大母神原型和偶像崇拜

    P3792 由乃与大母神原型和偶像崇拜 题目背景 由乃最近没事干,去研究轻拍学去了 就是一个叫做flip flappers,轻拍翻转小膜女的番 然后研究的过程中她看到了一个叫做大母神原型的东西 大母神 ...

  5. Spring AOP 自定义注解实现统一日志管理

    一.AOP的基本概念: AOP,面向切面编程,常用于日志,事务,权限等业务处理.AOP是OOP的延续,是软件开发中的一个热点,也是Spring框架中的一个重要内容(Spring核心之一),是函数式编程 ...

  6. php类内方法使用类外变量和类外函数

    如果要调用另一个类的属性和方法,直接实例化后调用就可以 但是要使用的变量和函数是独立的,不在本类或其他类里面,这时调用就要用下面的方法(本例是在同一个php文件里,如果不再同一个类文件可以requir ...

  7. Java中23种设计模式--超快速入门及举例代码

    在网上看了一些设计模式的文章后,感觉还是印象不太深刻,决定好好记录记录. 原文地址:http://blog.csdn.net/doymm2008/article/details/13288067 注: ...

  8. 005 Longest Palindromic Substring 最长回文子串

    Given a string s, find the longest palindromic substring in s. You may assume that the maximum lengt ...

  9. Zipkin — 微服务链路跟踪.

    一.Zipkin 介绍 Zipkin 是什么?  Zipkin的官方介绍:https://zipkin.apache.org/  Zipkin是一款开源的分布式实时数据追踪系统(Distributed ...

  10. 5 - 参考函数-API

    5.1 鼠标管理 a). MouseClick 点击鼠标 MouseClick ( "button" [, x, y [, clicks = 1 [, speed = 10]]] ...