第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何使用 Intent 向撥號器發(fā)送 *777# 之類的激活碼?

如何使用 Intent 向撥號器發(fā)送 *777# 之類的激活碼?

湖上湖 2022-07-20 19:29:21
我想使用意圖將代碼 *777# 發(fā)送到 android 中的撥號器,但我有一個問題只有 *777 密鑰代碼將顯示在撥號器上而不是 # 如何解決這個問題我是 android 開發(fā)人員的新手,所以請幫我解決這個問題.    String dialler_Code = "*777#";    Toast.makeText(this, "clicked", Toast.LENGTH_LONG)            .show();    // Use format with "tel:" and phoneNumber created is stored in u.    Uri u = Uri.parse("tel:" + dialler_Code);    // Create the intent and set the data for the intent as the phone number.    Intent i = new Intent(Intent.ACTION_DIAL, u);      try {        // Launch the Phone app's dialer with a phone number to dial a call.        startActivity(i);    } catch (SecurityException s) {        // show() method display the toast with exception message.        Toast.makeText(this, s.getMessage() , Toast.LENGTH_LONG)                .show();    }
查看完整描述

2 回答

?
慕婉清6462132

TA貢獻1804條經(jīng)驗 獲得超2個贊

嘗試String dialler_Code = Uri.encode("*777#");



查看完整回答
反對 回復(fù) 2022-07-20
?
嗶嗶one

TA貢獻1854條經(jīng)驗 獲得超8個贊

**用這個 : **


String enCodedHash = Uri.encode("#");


String number = "*151*1" + enCodedHash;


Intent callIntent = new Intent(Intent.ACTION_CALL);

callIntent.setData(Uri.parse("tel:"+ number));

startActivity(callIntent);


查看完整回答
反對 回復(fù) 2022-07-20
  • 2 回答
  • 0 關(guān)注
  • 131 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號