intent对于电话和浏览器调用
1、创建xml文件及按钮LinearLayout xmlns:android=http://schemas.android.com/apk/res/androidandroid:orientation=verticalandroid:layout_width=match_parentandroid:layout_height=match_parentButtonandroid:id=@+id/intentbtnandroid:layout_width=fil
1、创建xml文件及按钮 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:id="@+id/intentbtn" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="intent调用浏览器" android:layout_marginTop="100dp"/> <Button android:id="@+id/intentbtncall" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="intent调用电话"/> </LinearLayout> 2、新创建一个Intent的java文件 ublic class Intent_s extends Activity { //定义两个属性 private Button mbutton,callbutton; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.intent); //初始化属性 mbutton = (Button) findViewById(R.id.intentbtn); callbutton=(Button)findViewById(R.id.intentbtncall); //监听intent调用电话的按钮 callbutton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //标示地址 Uri uri = Uri.parse("tel:13881715535"); //新创建intent调用 Intent it = new Intent(Intent.ACTION_DIAL, uri); //启动 startActivity(it); } }); //监听intent调用浏览器的监听 mbutton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //标示地址 Uri uri = Uri.parse("http://www.baidu.com"); //新创建intent Intent intent = new Intent(); //调用intent intent.setAction(Intent.ACTION_VIEW); //向intent放入数据 intent.setData(uri); //启动 startActivity(intent); } }); }

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











The steps to register an Ouyi account are as follows: 1. Prepare a valid email or mobile phone number and stabilize the network. 2. Visit Ouyi’s official website. 3. Enter the registration page. 4. Select email or mobile phone number to register and fill in the information. 5. Obtain and fill in the verification code. 6. Agree to the user agreement. 7. Complete registration and log in, carry out KYC and set up security measures.

The Ouyi Exchange app supports downloading of Apple mobile phones, visit the official website, click the "Apple Mobile" option, obtain and install it in the App Store, register or log in to conduct cryptocurrency trading.

Sesame Open Door is a platform that focuses on cryptocurrency trading. Users can obtain portals through official websites or social media to ensure that the authenticity of SSL certificates and website content is verified during access.

Choose a reliable trading platform such as OKEx to ensure access to the official entrance.

To safely download the Binance APP, you need to go through the official channels: 1. Visit the Binance official website, 2. Find and click the APP download portal, 3. Choose to scan the QR code, app store, or directly download the APK file to download to ensure that the link and developer information are authentic, and enable two-factor verification to protect the security of the account.

Registering a Sesame Door Account requires 7 steps: 1. Prepare a valid email or mobile phone number and a stable network; 2. Visit the official website; 3. Enter the registration page; 4. Select and fill in the registration method; 5. Obtain and fill in the verification code; 6. Agree to the user agreement; 7. Complete registration and log in, it is recommended to carry out KYC and set security measures.

Visit Binance official website and check HTTPS and green lock logos to avoid phishing websites, and official applications can also be accessed safely.

The steps to register a Binance account include: 1. Prepare a valid email or mobile phone number and a stable network; 2. Visit Binance official website; 3. Enter the registration page; 4. Select the registration method; 5. Fill in the registration information; 6. Agree to the user agreement; 7. Complete verification; 8. Obtain and fill in the verification code; 9. Complete registration.
