- 浏览: 3902081 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
hinuliba:
...
字体背景颜色的高度修改 -
KANGOD:
最后的 -createDialog() 私有方法是怎么回事,没 ...
简单的实现listView中item多个控件以及点击事件 -
sswangqiao:
呵呵,呵呵
onActivityResult传值的使用 -
yumeiqiao:
感觉你所的不清楚 lstView.setOnTouchLi ...
listview中viewflipper的问题 -
lizhou828:
果然是大神啊!!!
Animation动画效果的实现
//show webapp: Uri uri = Uri.parse("http://www.google.com"); Intent it = new Intent(Intent.ACTION_VIEW,uri); startActivity(it); //show maps: Uri uri = Uri.parse("geo:38.899533,-77.036476"); Intent it = new Intent(Intent.Action_VIEW,uri); startActivity(it); //show ways Uri uri = Uri.parse("http://maps.google.com/maps?f=d&saddr=startLat%20startLng&daddr=endLat%20endLng&hl=en"); Intent it = new Intent(Intent.ACTION_VIEW,URI); startActivity(it); //call dial program Uri uri = Uri.parse("tel:xxxxxx"); Intent it = new Intent(Intent.ACTION_DIAL, uri); startActivity(it); Uri uri = Uri.parse("tel.xxxxxx"); Intent it =new Intent(Intent.ACTION_CALL,uri); //don't forget add this config:<uses-permission id="android.permission.CALL_PHONE" /> //send sms/mms //call sender program Intent it = new Intent(Intent.ACTION_VIEW); it.putExtra("sms_body", "The SMS text"); it.setType("vnd.android-dir/mms-sms"); startActivity(it); //send sms Uri uri = Uri.parse("smsto:0800000123"); Intent it = new Intent(Intent.ACTION_SENDTO, uri); it.putExtra("sms_body", "The SMS text"); startActivity(it); //send mms 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); //send 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")); //add extra 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")); //play media 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); //Uninstall Uri uri = Uri.fromParts("package", strPackageName, null); Intent it = new Intent(Intent.ACTION_DELETE, uri); startActivity(it); //uninstall apk Uri uninstallUri = Uri.fromParts("package", "xxx", null); returnIt = new Intent(Intent.ACTION_DELETE, uninstallUri); //install apk Uri installUri = Uri.fromParts("package", "xxx", null); returnIt = new Intent(Intent.ACTION_PACKAGE_ADDED, installUri); //play audio Uri playUri = Uri.parse("file:///sdcard/download/everything.mp3"); returnIt = new Intent(Intent.ACTION_VIEW, playUri); //send extra Intent it = new Intent(Intent.ACTION_SEND); it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text"); it.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/eoe.mp3"); sendIntent.setType("audio/mp3"); startActivity(Intent.createChooser(it, "Choose Email Client")); //search 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 //show program detail page 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 //search google Intent intent = new Intent(); intent.setAction(Intent.ACTION_WEB_SEARCH); intent.putExtra(SearchManager.QUERY,"searchString") startActivity(intent);
发表评论
-
URI 转path
2019-06-26 10:41 1225转自知乎Matisse package com.zhihu ... -
权限申请
2017-09-22 13:25 1222public class PermissionActivit ... -
onPreviewFrame 相机输出格式转换yuv420p保存成图片
2015-11-25 15:59 7485在最近项目中,因为特殊需要,底层相机往外输出了i420 也 ... -
new Android's Runtime Permission
2015-11-03 21:05 1191targetSdkVersion 23 开始 使用运行时权 ... -
自定义listview 边缘效果
2015-02-28 10:58 1701static void ChangeEdgeEffect( ... -
发射打开wifi
2015-01-07 10:25 1372WifiManager wifiManager = (Wif ... -
RecyclerView
2014-11-05 13:08 1209http://www.grokkingandroid.com ... -
获取点击区域
2014-04-28 09:39 1519@Override public void getHitR ... -
speex 和libogg 编译
2014-04-03 16:17 6367下载: http://www.speex.org/down ... -
rsync 同步
2014-03-28 17:06 1799两台android 设备 进行rsy ... -
流转字符串
2014-03-11 09:49 1478public static String convertSt ... -
java simplexml 序列化
2014-03-06 13:22 5883<?xml version="1.0&quo ... -
获取其他程序的特定资源
2014-03-05 09:33 1656try { PackageManager man ... -
检测来电属于哪个sim卡
2014-02-07 10:41 1676public class IncomingCallInter ... -
使用 NDK r9 编译ffmpeg
2014-01-16 13:32 167601. 环境 ubuntu 我的是13.10 ndk r9 ... -
android h264含so
2014-01-13 11:24 1507http://download.csdn.net/downlo ... -
xml转义字符
2013-12-18 09:29 1555" " ' & ... -
字体背景颜色的高度修改
2013-12-11 10:31 4143当使用android:lineSpacingExtra= ... -
屏保的实现
2013-12-07 10:27 2719最近需要做一个屏保,开始以为很简单,因为系统本身就带了屏保功 ... -
PreferenceActivity下嵌套PreferenceScreen在其它布局中
2013-11-21 16:32 9099今天在修改系统代码的时候,系统代码用了PreferenceA ...
相关推荐
初学移动应用公开发中的Android开发,实验四的主要内容为intent的使用,通过这一次实验,掌握基本的intent使用方法。 具体实验分析 实验第一步:阅读官方文档:intent 实验解析:本次实验共分为两个部分。第一个部分...
通过一个实验,讲解Android的使用方法,总结详细
Android Intent调用 Uri的方法总结 //调用浏览器 Uri uri = Uri.parse(); Intent it = new Intent(Intent.ACTION_VIEW,uri); startActivity(it); //显示某个坐标在地图上 Uri uri = Uri.parse(geo:38.899533,-...
归纳了利用自动化的工具具发现这4类形式的方法,通过批 量的扫描,可以轻易发现这些漏洞 在每种都找到了一个安卓OS或Chrome安卓版的0day,达 到本地提权或远程命令执行的效果,分别得到了Android 与Chrome的官方致谢
主要介绍了Android开发中Intent用法,总结分析了Android中Intent的功能、使用方法与相关注意事项,需要的朋友可以参考下
主要介绍了Android实现打开各种文件的intent方法,结合实例形式总结分析了Android针对HTML、图片文件、pdf文件、文本文件、音频文件、视频文件等的intent打开方法,需要的朋友可以参考下
Android 调用系统应用的方法总结 1、调用系统拍照 Intent intent = new Intent(android.media.action.IMAGE_CAPTURE); //保存到指定目录 File file = new File(/mnt/sdcard/picture); if (!file.exists()...
Android 启动第三方程序的方法总结 方法一: Intent intent = new Intent(); intent.setClassName(, ); startActivity(intent); 方法二: Intent i=new Intent; ComponentName com= new ComponentName...
基本数据类型、复杂数据类型(如数组、集合)、自定义数据类型等等都能支持,而且使用起来也不复杂。下面将通过几个小栗子分别介绍一下这几种方法。 1.1、基本数据类型传递 String 不是基本数据类型,
里面有set和get方法。 NoteAdapter类继承了ArrayAdapter,相当于是Note数组对象的适配器,用来包装Note数据,很好地实现数据和界面分离。 AddNewDiary这个类用于新建一则日记,使用add_new_diary.xml界面,这里没有...
文档通过代码实践总结了Activity的生命周期方法,Launcher Mode启动方式,Intent Filter的匹配规则。同时文档中用截图记录关键的Log信息。文件中也包含了代码可以方便的学习和理解Activity。
使用意图匹配Using intent matching 52 数据存储Data Storage 52 概览Storage quickview 52 系统偏好:快速,轻量级存储 52 文件:存储到设备内部或可移动闪存 52 数据库:任意的结构化存储 52 支持基于...
使用意图匹配Using intent matching 52 数据存储Data Storage 52 概览Storage quickview 52 系统偏好:快速,轻量级存储 52 文件:存储到设备内部或可移动闪存 52 数据库:任意的结构化存储 52 ...
Intent是信使,负责完成Android四大组件之间的信息传递,同类、不同类的组件无法直接传递对象,一旦需要沟通只能通过Intent(不建议通过静态变量或静态方法传递数据,容易造成数据异常、内存泄露等问题)。...
使用意图匹配Using intent matching 52 数据存储Data Storage 52 概览Storage quickview 52 ? 系统偏好:快速,轻量级存储 52 ? 文件:存储到设备内部或可移动闪存 52 ? 数据库:任意的结构化存储 52 ? 支持基于网络...
目录 1.坐标传递到google ...★44.intent action大全: 53 ★45.Android的动作、广播、类别等标志大全 54 ★★★46.附带工具包说明 60 1.APK反编译工具.rar 60 2.APK安装工具.rar 60 47.Google Maps 的应用 60
最近研究源码程序,改了改手机短信铃声的源码,最近总结了下铃声的代码,写个activity继承PreferenceActivity有:手机短信铃声,手机铃声,闹钟铃声,还有sdcard中的铃声,通过选择相应的铃声,然后读取到xml文件...