欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

c#使用xamarin編寫撥打電話程序

 更新時(shí)間:2015年05月18日 09:18:04   投稿:hebedich  
Xamarin是一個(gè)行動(dòng)App開(kāi)發(fā)平臺(tái),提供跨平臺(tái)開(kāi)發(fā)能力,開(kāi)發(fā)人員透過(guò)Xamarin開(kāi)發(fā)工具與程序語(yǔ)言,即可開(kāi)發(fā)出iOS、Android 與Windows 等平臺(tái)的原生(Native) App 應(yīng)用程序,不須個(gè)別使用各平臺(tái)的開(kāi)發(fā)工具與程序語(yǔ)言,

xamarin 可以很方便的編寫一個(gè)電話撥號(hào)程序,下面的代碼是調(diào)用android系統(tǒng)的撥號(hào)功能,撥號(hào)前會(huì)給出一個(gè)提示信息。

callButton是一個(gè)用來(lái)?yè)芴?hào)的按鈕,我們使用它的點(diǎn)擊事件來(lái)進(jìn)行撥號(hào),撥號(hào)前會(huì)有一個(gè)提示框

callButton.Click += (object sender, EventArgs e) =>
{
  // On "Call" button click, try to dial phone number. sharejs.com
  var callDialog = new AlertDialog.Builder(this);
  callDialog.SetMessage("Call " + translatedNumber + "?");
  callDialog.SetNeutralButton("Call", delegate {
      // Create intent to dial phone
      var callIntent = new Intent(Intent.ActionCall);
      callIntent.SetData(Android.Net.Uri.Parse("tel:" + translatedNumber));
      StartActivity(callIntent);
    });
  callDialog.SetNegativeButton("Cancel", delegate { });
 
  // Show the alert dialog to the user and wait for response.
  callDialog.Show();
};

以上所述就是本文的全部?jī)?nèi)容了,希望大家能夠喜歡。

相關(guān)文章

最新評(píng)論