導航:首頁 > 操作系統 > android跳轉撥號

android跳轉撥號

發布時間:2024-10-17 01:47:24

A. Android之Activity的幾種跳轉方式

intent2.setComponent(new ComponentName(this, OtherActivity.class)); //方法4 startActivity(intent2); 2.隱式調用方法(只要action、category、data和要跳轉到的Activity在AndroidManifest.xml中設置的匹配就OK 3.跳轉到另一個Activity後,當返回時能返回數據 在跳轉的Activity端,調用startActivityForResult(intent2, 1),跳轉到下一個Activity,其中第一個參數為傳入的意圖對象,第二個為設置的請求碼; 跳轉到第二個Activity後,調用setResult(100, intent)方法可返回上一個Activity,其中第一個參數為結果碼,第二個為傳入的意圖對象;

B. Android 跳轉到撥號界面如何自動填寫手機號,但是不自動撥出

1、跳轉到撥號界面,代碼如下:

1)直接撥打

java">IntentintentPhone=newIntent(Intent.ACTION_CALL,Uri.parse("tel:"+phoneNumber));
startActivity(intentPhone);

2)跳轉到撥號界面

Intentintent=newIntent(Intent.ACTION_DIAL,Uri.parse("tel:"+phoneNumber));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);


2、跳轉到聯系人頁面,使用一下代碼:

IntentintentPhone=newIntent(Intent.ACTION_CALL,Uri.parse("tel:"+phoneNumber));
startActivity(intentPhone);
閱讀全文

與android跳轉撥號相關的資料

熱點內容
php取余運算 瀏覽:150
php如何壓縮圖片大小 瀏覽:135
編程三階教程 瀏覽:981
pdf顏色查看 瀏覽:467
怎麼用指令停用命令方塊java 瀏覽:404
滑鼠命令行 瀏覽:567
如何朗讀pdf 瀏覽:744
壓縮機啟動後繼電器發燙 瀏覽:405
小學編程項目學習 瀏覽:555
net編譯運行原理 瀏覽:783
加密電腦的文件拷出來打不開 瀏覽:364
可達性演算法根 瀏覽:206
ibm的伺服器怎麼安裝系統 瀏覽:490
pdftomobi在線 瀏覽:795
phprsa密碼演算法 瀏覽:36
51單片機定時器暫停並加減 瀏覽:489
解壓粘粘球怎麼弄 瀏覽:177
人氣熱點個股的選股指標源碼 瀏覽:980
三星buds安卓手機怎麼連接 瀏覽:679
蘋果手機微信資料如何轉移到安卓手機 瀏覽:942