Android打开微信等其他应用

news/2024/7/7 18:36:46
   打开110
                    String phoneNumber = "120";
                    Intent intentPhone = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber));
                    startActivity(intentPhone);
                   
     打开微信{
                    Intent intent = new Intent();
                    ComponentName cmp = new ComponentName("com.tencent.mm", "com.tencent.mm.ui.LauncherUI");
                    intent.setAction(Intent.ACTION_MAIN);
                    intent.addCategory(Intent.CATEGORY_LAUNCHER);
                    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    intent.setComponent(cmp);
                    startActivity(intent);

                   


          拍照
                    Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);//调用android自带的照相机
                    // photoUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
                    startActivity(intent);
                    

http://www.niftyadmin.cn/n/3649421.html

相关文章

解决eclipse中logcat不显示log的问题

调试程序需要打印一些消息出来,logcat不好用的话就很麻烦了。这个问题折腾了好久,为啥就是不出来呢? 上网找了很多解决办法: 重启eclipse 重启adb 重启logcat ......等等好多 都没能解决我的问题。英文水平有限一般小问题就问百度…

最好用的Windows 10终端——FluentTerminal

Windows 10自带的终端太丑 Windows 10的终端界面设计的如此丑,无论是cmd,powershell 还是wsl。默认的颜色和字体都非常难看。虽然进行一些颜色的设置可以改善视觉效果,但是十分麻烦,而且最奇怪的是设置不能同步到不同的快捷方式。…

[SIP]SIP协议场景生成器

http://www.iptel.org/~sipsc/IPTel提供了一款用Perl写的SIP协议场景生成器,能够以html方式生成SIP呼叫流或SIP场景数据包。下载解压缩后,可以浏览sip_scenario.v1.2.7/generated_files下的那些html文件,也可以运行sip_scenario.exe创建。ipt…

相机和CircleImageView的使用

首先第一步&#xff1a;导入包:compile de.hdodenhof:circleimageview:2.1.0各位可以去这个网址看这个控件的介绍https://github.com/hdodenhof/CircleImageView 布局&#xff1a; <de.hdodenhof.circleimageview.CircleImageViewandroid:id"id/profile_image"a…

如何为Visual Studio Code创建扩展包

介绍 (Introduction) Extension Packs in Visual Studio Code are useful when you want to install a collection of related extensions. In this article, you’ll create an Extension Pack so you can share your collection of extensions with other developers. 当您要…

Android如何获取APP启动时间

Android平台上&#xff0c;一个App的启动时间可以说是一个重要的性能指标。如何获取一个App的启动时间呢&#xff0c;接下来咱们详细探讨一下。 在查阅Android的文档之后发现&#xff0c;Android的shell命令里面是有这个功能的&#xff0c;打开adb&#xff0c;输入以下命令 am是…

分享我的第一个Web作品——纯静态网站

以下是一年前学习Web基础开发时候的期末作品——计算机学习网。当时刚开始学习HTML和CSS。 网站采用HTMLCSSJavaScript的架构设计&#xff0c;当时大概用了12天左右&#xff0c;当然这12天还在上其他的课&#xff0c;这是利用课余时间做的。网站包括主页、内容页、登录和注册页…

javascript闭包_JavaScript的闭包和咖喱介绍

javascript闭包介绍 (Introduction) If you write code in JavaScript it’s quite likely you have come across the term closure, which is a useful yet often confusing concept. But just what is a closure? 如果您使用JavaScript编写代码&#xff0c;很可能会遇到术语…