android intent和intent action大全

【GeoDa实用技巧100例】024:geoda计算全局(局部)莫兰指数Moran‘s I,LISA聚类地图,显著性地图 【GeoDa实用技巧100例】024:geoda计算全局(局部)莫兰指数Moran's I,单变量莫兰指数,双变量莫兰指数计算,LISA聚类地图,显著性地图,Geoda双变量莫兰指数是一种强大的地理空间数据分析工具。 阅读详情

android intent和intent action大全

android 中intent是经常要用到的。不管是页面牵转,还是传递数据,或是调用外部程序,系统功能都要用到intent。在做了一些intent的例子之后,整理了一下intent,希望对大家有用。由于intent内容太多,不可能真的写全,难免会有遗落,以后我会随时更新。如果你们有疑问或新的intent内容,希望交流。
★intent大全:
1.从google搜索内容
Intent intent = new Intent();
intent.setAction(Intent.ACTION_WEB_SEARCH);
intent.putExtra(SearchManager.QUERY,"searchString")
startActivity(intent);

2.浏览网页
Uri uri = Uri.parse("http://www.google.com");
Intent it  = new Intent(Intent.ACTION_VIEW,uri);
startActivity(it);

3.显示地图
Uri uri = Uri.parse("geo:38.899533,-77.036476");
Intent it = new Intent(Intent.Action_VIEW,uri);
startActivity(it);

4.路径规划
Uri uri = Uri.parse("http://maps.google.com/maps?f=dsaddr=startLat%20startLng&daddr=endLat%20endLng&hl=en");
Intent it = new Intent(Intent.ACTION_VIEW,URI);
startActivity(it);

5.拨打电话
Uri uri = Uri.parse("tel:xxxxxx");
Intent it = new Intent(Intent.ACTION_DIAL, uri);  
startActivity(it);

6.调用发短信的程序
Intent it = new Intent(Intent.ACTION_VIEW);   
it.putExtra("sms_body", "The SMS text");   
it.setType("vnd.android-dir/mms-sms");   
startActivity(it);

7.发送短信
Uri uri = Uri.parse("smsto:0800000123");   
Intent it = new Intent(Intent.ACTION_SENDTO, uri);   
it.putExtra("sms_body", "The SMS text");   
startActivity(it);
String body="this is sms demo";
Intent mmsintent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("smsto", number, null));
mmsintent.putExtra(Messaging.KEY_ACTION_SENDTO_MESSAGE_BODY, body);
mmsintent.putExtra(Messaging.KEY_ACTION_SENDTO_COMPOSE_MODE, true);
mmsintent.putExtra(Messaging.KEY_ACTION_SENDTO_EXIT_ON_SENT, true);
startActivity(mmsintent);

8.发送彩信
Uri uri = Uri.parse("content://media/external/images/media/23");   
Intent it = new Intent(Intent.ACTION_SEND);   
it.putExtra("sms_body", "some text");   
it.putExtra(Intent.EXTRA_STREAM, uri);   
it.setType("image/png");   
startActivity(it);
StringBuilder sb = new StringBuilder();
sb.append("file://");
sb.append(fd.getAbsoluteFile());
Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts("mmsto", number, null));
// Below extra datas are all optional.
intent.putExtra(Messaging.KEY_ACTION_SENDTO_MESSAGE_SUBJECT, subject);
intent.putExtra(Messaging.KEY_ACTION_SENDTO_MESSAGE_BODY, body);
intent.putExtra(Messaging.KEY_ACTION_SENDTO_CONTENT_URI, sb.toString());
intent.putExtra(Messaging.KEY_ACTION_SENDTO_COMPOSE_MODE, composeMode);
intent.putExtra(Messaging.KEY_ACTION_SENDTO_EXIT_ON_SENT, exitOnSent);
startActivity(intent);

9.发送Email
Uri uri = Uri.parse("mailto:xxx@abc.com");
Intent it = new Intent(Intent.ACTION_SENDTO, uri);
startActivity(it);
Intent it = new Intent(Intent.ACTION_SEND);   
it.putExtra(Intent.EXTRA_EMAIL, "me@abc.com");   
it.putExtra(Intent.EXTRA_TEXT, "The email body text");   
it.setType("text/plain");   
startActivity(Intent.createChooser(it, "Choose Email Client"));
Intent it=new Intent(Intent.ACTION_SEND);     
String[] tos={"me@abc.com"};     
String[] ccs={"you@abc.com"};     
it.putExtra(Intent.EXTRA_EMAIL, tos);     
it.putExtra(Intent.EXTRA_CC, ccs);     
it.putExtra(Intent.EXTRA_TEXT, "The email body text");     
it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");     
it.setType("message/rfc822");     
startActivity(Intent.createChooser(it, "Choose Email Client"));   

Intent it = new Intent(Intent.ACTION_SEND);   
it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");   
it.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/mysong.mp3");   
sendIntent.setType("audio/mp3");   
startActivity(Intent.createChooser(it, "Choose Email Client"));

10.播放多媒体  
Intent it = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("file:///sdcard/song.mp3");
it.setDataAndType(uri, "audio/mp3");
startActivity(it);
Uri uri = Uri.withAppendedPath(MediaStore.Audio.Media.INTERNAL_CONTENT_URI, "1");   
Intent it = new Intent(Intent.ACTION_VIEW, uri);   
startActivity(it);

11.uninstall apk
Uri uri = Uri.fromParts("package", strPackageName, null);   
Intent it = new Intent(Intent.ACTION_DELETE, uri);   
startActivity(it);

12.install apk
Uri installUri = Uri.fromParts("package", "xxx", null);
returnIt = new Intent(Intent.ACTION_PACKAGE_ADDED, installUri);

13. 打开照相机

    <1>Intent i = new Intent(Intent.ACTION_CAMERA_BUTTON, null);
           this.sendBroadcast(i);

     <2>long dateTaken = System.currentTimeMillis();
            String name = createName(dateTaken) + ".jpg";
            fileName = folder + name;
            ContentValues values = new ContentValues();
            values.put(Images.Media.TITLE, fileName);
            values.put("_data", fileName);
            values.put(Images.Media.PICASA_ID, fileName);
            values.put(Images.Media.DISPLAY_NAME, fileName);
            values.put(Images.Media.DESCRIPTION, fileName);
            values.put(Images.ImageColumns.BUCKET_DISPLAY_NAME, fileName);
            Uri photoUri = getContentResolver().insert(
                    MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
            
            Intent inttPhoto = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
            inttPhoto.putExtra(MediaStore.EXTRA_OUTPUT, photoUri);
            startActivityForResult(inttPhoto, 10);

14.从gallery选取图片
  Intent i = new Intent();
            i.setType("image/*");
            i.setAction(Intent.ACTION_GET_CONTENT);
            startActivityForResult(i, 11);

15. 打开录音机
   Intent mi = new Intent(Media.RECORD_SOUND_ACTION);
            startActivity(mi);

16.显示应用详细列表      
Uri uri = Uri.parse("market://details?id=app_id");        
Intent it = new Intent(Intent.ACTION_VIEW, uri);        
startActivity(it);        
//where app_id is the application ID, find the ID         
//by clicking on your application on Market home         
//page, and notice the ID from the address bar     

刚才找app id未果,结果发现用package name也可以
Uri uri = Uri.parse("market://details?id=<packagename>");
这个简单多了

17寻找应用      
Uri uri = Uri.parse("market://search?q=pname:pkg_name");        
Intent it = new Intent(Intent.ACTION_VIEW, uri);        
startActivity(it);
//where pkg_name is the full package path for an application      

18打开联系人列表
            <1>           
           Intent i = new Intent();
           i.setAction(Intent.ACTION_GET_CONTENT);
           i.setType("vnd.android.cursor.item/phone");
           startActivityForResult(i, REQUEST_TEXT);

            <2>
            Uri uri = Uri.parse("content://contacts/people");
            Intent it = new Intent(Intent.ACTION_PICK, uri);
            startActivityForResult(it, REQUEST_TEXT);

19 打开另一程序
Intent i = new Intent();
            ComponentName cn = new ComponentName("com.yellowbook.android2",
                    "com.yellowbook.android2.AndroidSearch");
            i.setComponent(cn);
            i.setAction("android.intent.action.MAIN");
            startActivityForResult(i, RESULT_OK);

20.调用系统编辑添加联系人(高版本SDK有效):
Intent it = new Intent(Intent.ACTION_INSERT_OR_EDIT);
                it.setType("vnd.android.cursor.item/contact");
                // it.setType(Contacts.CONTENT_ITEM_TYPE);
                it.putExtra("name", "myName");
                it.putExtra(android.provider.Contacts.Intents.Insert.COMPANY,  "organization");
                it.putExtra(android.provider.Contacts.Intents.Insert.EMAIL, "email");
                it.putExtra(android.provider.Contacts.Intents.Insert.PHONE,"homePhone");
                it.putExtra( android.provider.Contacts.Intents.Insert.SECONDARY_PHONE,
                                "mobilePhone");
                it.putExtra(  android.provider.Contacts.Intents.Insert.TERTIARY_PHONE,
                                "workPhone");
                it.putExtra(android.provider.Contacts.Intents.Insert.JOB_TITLE,"title");
                startActivity(it);

21.调用系统编辑添加联系人(全有效):
Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
            intent.setType(People.CONTENT_ITEM_TYPE);
            intent.putExtra(Contacts.Intents.Insert.NAME, "My Name");
            intent.putExtra(Contacts.Intents.Insert.PHONE, "+1234567890");
            intent.putExtra(Contacts.Intents.Insert.PHONE_TYPE, Contacts.PhonesColumns.TYPE_MOBILE);
            intent.putExtra(Contacts.Intents.Insert.EMAIL, "com@com.com");
            intent.putExtra(Contacts.Intents.Insert.EMAIL_TYPE,                    Contacts.ContactMethodsColumns.TYPE_WORK);
            startActivity(intent);

22(更新)
    //直接打电话出去  
    Uri uri = Uri.parse("tel:0800000123");  
    Intent it = new Intent(Intent.ACTION_CALL, uri);  
    startActivity(it);  
    //用這個,要在 AndroidManifest.xml 中,加上  
    //<uses-permission id="android.permission.CALL_PHONE" />


23.最基本的share 信息的intent,可以传一段text信息到各个手机上已安装程序:如SMS,Email,sina微波,米聊,facebook,twitter等等

                Intent it = new Intent(Intent.ACTION_SEND);
                it.putExtra(Intent.EXTRA_TEXT, "The email subject text");
                it.setType("text/plain");
                startActivity(Intent.createChooser(it, "Choose Email Client"));
         
24.调用skype 的intent

方法1:老版,新版不可用,可能是因为skype的activity结构变动:

//        Intent sky = new Intent("android.intent.action.CALL_PRIVILEGED");
//        sky.setClassName("com.skype.raider",
//                "com.skype.raider.contactsync.ContactSkypeOutCallStartActivity");
//        sky.setData(Uri.parse("tel:" + phone));
//        startActivity(sky);

方法2:打开到skype的main page:

//        PackageManager packageManager = getActivity().getPackageManager();
//        Intent skype = packageManager.getLaunchIntentForPackage("com.skype.raider");
//        skype.setData(Uri.parse("tel:65465446"));
//        startActivity(skype);

方法3:传入号码,直接进入skype拨号画面并打电话:

        Intent intent = new Intent("android.intent.action.CALL_PRIVILEGED");  
        intent.setClassName("com.skype.raider",
        "com.skype.raider.Main");
        intent.setData(Uri.parse("tel:" + phone));  
        startActivity(intent);   

★intent action大全:
  • android.intent.action.ALL_APPS
  • android.intent.action.ANSWER
  • android.intent.action.ATTACH_DATA
  • android.intent.action.BUG_REPORT
  • android.intent.action.CALL
  • android.intent.action.CALL_BUTTON
  • android.intent.action.CHOOSER
  • android.intent.action.CREATE_LIVE_FOLDER
  • android.intent.action.CREATE_SHORTCUT
  • android.intent.action.DELETE
  • android.intent.action.DIAL
  • android.intent.action.EDIT
  • android.intent.action.GET_CONTENT
  • android.intent.action.INSERT
  • android.intent.action.INSERT_OR_EDIT
  • android.intent.action.MAIN
  • android.intent.action.MEDIA_SEARCH
  • android.intent.action.PICK
  • android.intent.action.PICK_ACTIVITY
  • android.intent.action.RINGTONE_PICKER
  • android.intent.action.RUN
  • android.intent.action.SEARCH
  • android.intent.action.SEARCH_LONG_PRESS
  • android.intent.action.SEND
  • android.intent.action.SENDTO
  • android.intent.action.SET_WALLPAPER
  • android.intent.action.SYNC
  • android.intent.action.SYSTEM_TUTORIAL
  • android.intent.action.VIEW
  • android.intent.action.VOICE_COMMAND
  • android.intent.action.WEB_SEARCH
  • android.net.wifi.PICK_WIFI_NETWORK
  • android.settings.AIRPLANE_MODE_SETTINGS
  • android.settings.APN_SETTINGS
  • android.settings.APPLICATION_DEVELOPMENT_SETTINGS
  • android.settings.APPLICATION_SETTINGS
  • android.settings.BLUETOOTH_SETTINGS
  • android.settings.DATA_ROAMING_SETTINGS
  • android.settings.DATE_SETTINGS
  • android.settings.DISPLAY_SETTINGS
  • android.settings.INPUT_METHOD_SETTINGS
  • android.settings.INTERNAL_STORAGE_SETTINGS
  • android.settings.LOCALE_SETTINGS
  • android.settings.LOCATION_SOURCE_SETTINGS
  • android.settings.MANAGE_APPLICATIONS_SETTINGS
  • android.settings.MEMORY_CARD_SETTINGS
  • android.settings.NETWORK_OPERATOR_SETTINGS
  • android.settings.QUICK_LAUNCH_SETTINGS
  • android.settings.SECURITY_SETTINGS
  • android.settings.SETTINGS
  • android.settings.SOUND_SETTINGS
  • android.settings.SYNC_SETTINGS
  • android.settings.USER_DICTIONARY_SETTINGS
  • android.settings.WIFI_IP_SETTINGS
  • android.settings.WIFI_SETTINGS
  • android.settings.WIRELESS_SETTINGS

来源:http://blog.youkuaiyun.com/t80t90s/article/details/8086305



出现 has been blocked by CORS policy: No ‘Access-Control-Allow-Origin‘ header is present on the 解决方法 Access to XMLHttpRequest at 'http://127.0.0.1:5000/api/data' from origin 'http://10.197.0.79:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. 阅读详情

相关推荐

Plant Simulation新手入门:从零开始搭建工厂布局仿真模型(附完整代码)

本文为Plant Simulation新手提供了一个从零开始搭建工厂布局仿真模型的完整实战教程。通过一个玩具工厂车间布局优化的具体案例,详细讲解了从数据准备、模型构建、核心逻辑编程到连接遗传算法进行自动优化的全流程,并附有完整代码示例,帮助读者快速掌握这一工业仿真软件的核心应用。

metal的博客 554

Android 打开钱箱子

//或者发送 android.intent.money_test.action 这个广播作用是一样的 Intent intent = new Intent("android.intent.cashbox_open"); sendBroadcast(intent);

weixin_39165470的博客 998

STM32F429网络通信避坑指南:用CubeMX搞定LAN8720+LWIP+FreeRTOS(附完整代码)

本文详细介绍了STM32F429通过CubeMX配置LAN8720+LWIP+FreeRTOS实现网络通信的避坑指南,涵盖硬件连接、CubeMX配置、LWIP优化及调试技巧,提供完整代码和实战经验,帮助开发者高效解决以太网通信中的常见问题。

weixin_26873711的博客 145

Intent 各种跳转

现在开发中的功能需要直接跳转到拨号、联系人、短信界面等等,查找了很多资料,自己整理了一下。 首先,我们先看拨号界面,代码如下: [java] view plaincopyprint? Intent intent =new Intent();              intent.setAction("android.intent.action.CALL_BUTT

JavaKotlin技术专栏 1万+

FREERTOS+LWIP+IAP实现TCP、HTTP、网页访问并固件升级、更新配置 (三)lwip实现httpd服务并在web访问

在前两篇文章中配置freeRTOS和,并实现了TCP、UDP的通信协议,现在终于轮到重头戏lwip的httpd服务,LWIP官方例程中是有很多自带的网页的,但是远远不够满足实际项目的使用需求,因此我也是踩了很多坑,从前端网页制作,到网络通信的实现,到后端数据处理,从头开始学起,也是学习到了很多没接触过的东西,本章将搭建LWIP的HTTP服务使得浏览器可以访问WEB。

wangjiaheng0716的博客 2965

OCEAN 电路仿真

介绍利用 Cadence OCEAN 进行电路脚本仿真的方法

weixin_43249158的博客 4404

Android中的Intent详细讲解

在一个Android应用中,主要是由四种组件组成的,这四种组件可参考“Android应用的构成”。 而这四种组件是独立的,它们之间可以互相调用,协调工作,最终组成一个真正的Android应用。 在这些组件之间的通讯中,主要是由Intent协助完成的。 Intent负责对应用中一次操作的动作、动作涉及数据、附加数据进行描述,Android则根据此Intent的描述,负...

weixin_33827731的博客 321

手把手讲解RTX5操作系统在GD32F407上的移植

然后将GD32F4xx_Demo_Suites_V2.6.4\GD32407V_START_Demo_Suites\Projects\01_GPIO_Running_LED下面的main函数复制到我们的项目文件夹中;打开对应GD32407V_START_Demo_Suites的文件夹下面的Utilities,复制gd32f407v_start.c和gd32f407v_start.h文件到一开始项目保存的文件夹下面;为了验证我们的操作系统是否被正确添加,是否能够正确运行,我们需要添加示例文件;

Praguejing的博客 1863

android笔记--Intent和IntentFilter

[coolxing按: 转载请注明作者和出处, 如有谬误, 欢迎在评论中指正.]  Intent用于启动Activity, Service, 以及BroadcastReceiver三种组件, 同时还是组件之间通信的重要媒介. 使用Intent启动组件的优势 1, Intent为组件的启动提供了一致的编程模型. 无论想要启动的组件是Activity, Service, 还是Broadc...

coolxing 394

NVMe-MI --- Message Servicing Model(消息服务模型)

本文主要介绍NVMe-MI消息服务模型,两个主要类别是请求消息和响应消息。并介绍带外机制消息服务状态机。

智小星的博客 2014

GD32F470移植LWIP协议,PHY芯片DP83848I

也就是说前24位是有规定的,其中48位MAC中的前几位也是有着对应的含义的。2、旧版LWIP(如1.4.1)存在DHCP状态机卡死问题,建议升级至2.1.3+。

m0_61973119的博客 1591

Android Intent Action 大全

Android Intent Action 大全 String ADD_SHORTCUT_ACTION 动作:在系统中添加一个快捷方式。. "android.intent.action.ADD_SHORTCUT" String ALL_APPS_ACTION 动作:列举所有可用的应用。 输入:无。 "android.intent.action.ALL_APPS" String ALTE

liws2010的专栏 1195

面向高速Serdes的信号完整性优化:从封装 - 板级互连局限到封装内互连技术演进(一)

本文针对高速SerDes互连链路中的关键电磁效应展开研究:1)揭示了封装-主板互连结构在毫米波频段易激发谐振效应,导致53GHz传输陷波和阻抗偏移;2)提出基于本征模分析的谐振抑制方法,通过优化接地过孔排布使带宽突破95GHz;3)系统比较了方形/六边形BGA排布下23种差分对朝向的串扰特性,证实六边形阵列可将功率和串扰降低30%以上;4)论证了100GHz以上带宽需采用封装内互连架构,其较传统方案减少50%阻抗不连续节点。

小孟同学的博客 231

android intent和intent action大全,Broadcast Action大全

android intent和intent action大全 1.Intent的用法: (1)用Action跳转 1、使用Action跳转,如果有一个程序的AndroidManifest.xml中的某一个 Activity的IntentFilter段中 定义了包含了相同的Action那么这个Intent就与这个目标Action匹配。如果这个IntentFilter

欢迎加入Android老司机学院 482266514(技术交流群)密码优快云 995

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

Android intent action大全

android 中intent是经常要用到的。不管是页面牵转,还是传递数据,或是调用外部程序,系统功能都要用到intent。在做了一些intent的例子之后,整理了一下intent,希望对大家有用。由于intent内容太多,不可能真的写全,难免会有遗落,以后我会随时更新。如果你们有疑问或新的intent内容,希望交流。  ★intent大全:  1.从google搜索内容  Intent i

jwzhangjie的专栏 2234

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

【Android】Intent action大全

String ADD_SHORTCUT_ACTION 动作:在系统中添加一个快捷方式。. “android.intent.action.ADD_SHORTCUT”   String ALL_APPS_ACTION 动作:列举所有可用的应用。   输入:无。 “android.intent.action.ALL_APPS”   String ALTERNATIVE_CATEGORY

心有猛虎,细嗅蔷薇 2371

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

上一篇: android 语音识别
下一篇: Android 版本检测
SpeedyCoder
博客等级 码龄14年 415粉丝 7原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值