- 浏览: 125119 次
- 性别:
- 来自: 北京
最新评论
-
yangtaoxf126.com:
public class SimpleJDBC {
publ ...
oracle的sys用户怎么通过jdbc连接
显示网页
Java代码
Uri uri = Uri.parse(“http://www.2phone8.com.cn”);
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity(it);
Uri uri = Uri.parse(“http://www.2phone8.com.cn”); Intent it = new Intent(Intent.ACTION_VIEW, uri); startActivity(it);
显示地图
Java代码
Uri uri = Uri.parse(“geo:38.899533,-77.036476″);
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity(it);
//其他 geo URI 範例
//geo:latitude,longitude
//geo:latitude,longitude?z=zoom
//geo:0,0?q=my+street+address
//geo:0,0?q=business+near+city
//google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom
Uri uri = Uri.parse(“geo:38.899533,-77.036476″); Intent it = new Intent(Intent.ACTION_VIEW, uri); startActivity(it); //其他 geo URI 範例 //geo:latitude,longitude //geo:latitude,longitude?z=zoom //geo:0,0?q=my+street+address //geo:0,0?q=business+near+city //google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom
拨打电话
Java代码
//叫出撥號程式
Uri uri = Uri.parse(“tel:0800000123″);
Intent it = new Intent(Intent.ACTION_DIAL, uri);
startActivity(it);
//直接打電話出去
Uri uri = Uri.parse(“tel:0800000123″);
Intent it = new Intent(Intent.ACTION_CALL, uri);
startActivity(it);
//用這個,要在 AndroidManifest.xml 中,加上
//
//叫出撥號程式 Uri uri = Uri.parse(“tel:0800000123″); Intent it = new Intent(Intent.ACTION_DIAL, uri); startActivity(it); //直接打電話出去 Uri uri = Uri.parse(“tel:0800000123″); Intent it = new Intent(Intent.ACTION_CALL, uri); startActivity(it); //用這個,要在 AndroidManifest.xml 中,加上 //
发送SMS/MMS
Java代码
//需写号码SMS
Intent it = new Intent(Intent.ACTION_VIEW);
it.putExtra(“sms_body”, “The SMS text”);
it.setType(“vnd.android-dir/mms-sms”);
startActivity(it);
//发送SMS
Uri uri = Uri.parse(“smsto:0800000123″);
Intent it = new Intent(Intent.ACTION_SENDTO, uri);
it.putExtra(“sms_body”, “The SMS text”);
startActivity(it);
//发送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);
//需写号码SMS Intent it = new Intent(Intent.ACTION_VIEW); it.putExtra(“sms_body”, “The SMS text”); it.setType(“vnd.android-dir/mms-sms”); startActivity(it); //发送SMS Uri uri = Uri.parse(“smsto:0800000123″); Intent it = new Intent(Intent.ACTION_SENDTO, uri); it.putExtra(“sms_body”, “The SMS text”); startActivity(it); //发送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);
发送EMAIL
Java代码
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”));
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”));
播放多媒体
Java代码
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);
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);
Android Market
Java代码
//寻找应用
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
//显示应用详细列表
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
//寻找应用 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 //显示应用详细列表 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
卸载应用
Java代码
Uri uri = Uri.fromParts(“package”, strPackageName, null);
Intent it = new Intent(Intent.ACTION_DELETE, uri);
startActivity(it);
Uri uri = Uri.fromParts(“package”, strPackageName, null); Intent it = new Intent(Intent.ACTION_DELETE, uri); startActivity(it);
安装应用
Java代码
Uri uri = Uri.parse(“url_of_apk_file”);
Intent it = new Intent(Intent.ACTION_VIEW, uri);
it.setData(uri);
it.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
it.setClassName(“com.android.packageinstaller”,
“com.android.packageinstaller.PackageInstallerActivity”);
startActivity(it);
//make sure the url_of_apk_file is readable for all users
Java代码
Uri uri = Uri.parse(“http://www.2phone8.com.cn”);
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity(it);
Uri uri = Uri.parse(“http://www.2phone8.com.cn”); Intent it = new Intent(Intent.ACTION_VIEW, uri); startActivity(it);
显示地图
Java代码
Uri uri = Uri.parse(“geo:38.899533,-77.036476″);
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity(it);
//其他 geo URI 範例
//geo:latitude,longitude
//geo:latitude,longitude?z=zoom
//geo:0,0?q=my+street+address
//geo:0,0?q=business+near+city
//google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom
Uri uri = Uri.parse(“geo:38.899533,-77.036476″); Intent it = new Intent(Intent.ACTION_VIEW, uri); startActivity(it); //其他 geo URI 範例 //geo:latitude,longitude //geo:latitude,longitude?z=zoom //geo:0,0?q=my+street+address //geo:0,0?q=business+near+city //google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom
拨打电话
Java代码
//叫出撥號程式
Uri uri = Uri.parse(“tel:0800000123″);
Intent it = new Intent(Intent.ACTION_DIAL, uri);
startActivity(it);
//直接打電話出去
Uri uri = Uri.parse(“tel:0800000123″);
Intent it = new Intent(Intent.ACTION_CALL, uri);
startActivity(it);
//用這個,要在 AndroidManifest.xml 中,加上
//
//叫出撥號程式 Uri uri = Uri.parse(“tel:0800000123″); Intent it = new Intent(Intent.ACTION_DIAL, uri); startActivity(it); //直接打電話出去 Uri uri = Uri.parse(“tel:0800000123″); Intent it = new Intent(Intent.ACTION_CALL, uri); startActivity(it); //用這個,要在 AndroidManifest.xml 中,加上 //
发送SMS/MMS
Java代码
//需写号码SMS
Intent it = new Intent(Intent.ACTION_VIEW);
it.putExtra(“sms_body”, “The SMS text”);
it.setType(“vnd.android-dir/mms-sms”);
startActivity(it);
//发送SMS
Uri uri = Uri.parse(“smsto:0800000123″);
Intent it = new Intent(Intent.ACTION_SENDTO, uri);
it.putExtra(“sms_body”, “The SMS text”);
startActivity(it);
//发送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);
//需写号码SMS Intent it = new Intent(Intent.ACTION_VIEW); it.putExtra(“sms_body”, “The SMS text”); it.setType(“vnd.android-dir/mms-sms”); startActivity(it); //发送SMS Uri uri = Uri.parse(“smsto:0800000123″); Intent it = new Intent(Intent.ACTION_SENDTO, uri); it.putExtra(“sms_body”, “The SMS text”); startActivity(it); //发送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);
发送EMAIL
Java代码
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”));
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”));
播放多媒体
Java代码
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);
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);
Android Market
Java代码
//寻找应用
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
//显示应用详细列表
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
//寻找应用 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 //显示应用详细列表 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
卸载应用
Java代码
Uri uri = Uri.fromParts(“package”, strPackageName, null);
Intent it = new Intent(Intent.ACTION_DELETE, uri);
startActivity(it);
Uri uri = Uri.fromParts(“package”, strPackageName, null); Intent it = new Intent(Intent.ACTION_DELETE, uri); startActivity(it);
安装应用
Java代码
Uri uri = Uri.parse(“url_of_apk_file”);
Intent it = new Intent(Intent.ACTION_VIEW, uri);
it.setData(uri);
it.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
it.setClassName(“com.android.packageinstaller”,
“com.android.packageinstaller.PackageInstallerActivity”);
startActivity(it);
//make sure the url_of_apk_file is readable for all users
发表评论
-
15个Android很有用的代码片段
2010-09-20 15:47 7621:查看是否有存储卡插入 String status=Envi ... -
linux下/proc/stat 计算CPU利用率
2010-09-20 12:57 4417Linux平台Cpu使用率的计算 proc文件系统 /pr ... -
Android进程管理机制及优化 for HTC HeRO(其它设备也可参考)+自动内存管理程序
2010-09-19 16:33 1898理论 Android采取了一种有别于Linux的进程管理策略 ... -
android proc 进程信息解析
2010-09-19 16:23 5461如何查看ANDROID进程信息呢,可以先进入ADB SHELL ... -
Android获取所有安装APP信息
2010-09-19 10:11 1357class PInfo { private Str ... -
Android kill app Process 结束进程代码
2010-09-19 09:00 3925第一种: android.os.Process.killPr ... -
Android GPS获取地理位置
2010-09-18 22:49 2841import android.app.Activity; im ...
相关推荐
罗列了android常用两种检测网络方法,在工作线程中定时执行检测操作
Android罗列sd磁盘
Kotlin语法实战与Android应用笔记:...5、全面地罗列了Android系统的常用组件:Activity、Service、BraodcastReceiver和ContentProvider,各Wedget的成员属性和方法,包括AlertDialog的几种用法,List的Adapter构造等。
罗列了app渗透测试的工具,方法以及测试需要达到的结果。方法详尽,目的明确。现在应用安全已由pc端转向移动端,移动端app渗透测试不可或缺。
罗列一些常用命令,供应急的时候查询用,包括一些系统相关的使用设置语句……
罗列图标带字.rar
上述罗列的各种开源框架的使用方法; Java8 Lambda表达式和Stream API的用法; 怎样适配Material Design; ToolBar、RecycleView、CardView、CoordinatorLayout等新控件的用法; Gradle的基本配置(包括签名打包、...
全面的罗列了android权限,并有中文解释,查找方便
js 实现 罗列对象的属性和值! 值得下载看看!资源免费,大家分享!!
这是一个专用于解决Android中网络请求及图片加载的缓存处理框架 项目目标 本项目是作为实验项目,不保证其稳定性及可靠性 因为缓存业务的复杂性,本项目尽可能适应更多的使用场景 目前考虑到的,会实现的功能清单,...
主要介绍了android中intent传递list或者对象的方法,分析罗列了常用的几种方法,具有一定参考借鉴价值,需要的朋友可以参考下
(二)热卖模块:该模块主要罗列了商城中的所有类型图书,可根据自己的爱好进行大致浏览,也可点击链接了解图书的详细情况:如简介、作者、出版社等信息。 (三)购物车模块:将自己需要的图书加入到购物车中,在...
Android Studio 天气预报,含有基本功能:可以罗列全国所有的省、市、县;可以查看全国任意城市天气信息;可以自由切换城市,去产看其他城市的天气;提供手动更新以及后台自动更新天气功能。访问中国所有省份,需要...
实用圆形并列罗列PPT图形.pptx
详细罗列了android框架常用开发包及产用的开发技巧。其中此文档重点在于UI设计及一些也面上的技巧
在Android开发中,经常会使用WebView来实现WEB页面的展示,在Activiry中启动自己的浏览器,或者简单的展示一些在线内容等。WebView功能强大,应用广泛,但它是天使与恶魔的合体,一方面它增强了APP的上网体验,让APP...
数学建模中常用的方法,罗列的比较详细,看看哈
罗列IP地址的一个应用(VC)
文件板夹项目罗列PPT模板