Platforms》Android》AndroidManifest.xml中加配置
1 2 3 4 5 6 7 8 9 10 11 | <manifest xmlns:android= "http://schemas.android.com/apk/res/android" > <application android:allowBackup= "true" android:icon= "@mipmap/appicon" android:roundIcon= "@mipmap/appicon_round" android:supportsRtl= "true" ></application> <uses-permission android:name= "android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name= "android.permission.INTERNET" /> <queries> <intent> <action android:name= "android.intent.action.DIAL" /> <data android:scheme= "tel" /> </intent> </queries> </manifest> |
自定义事件 translatedNumber 是电话号码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | public async void OnCall( object sender, System.EventArgs e) { if (await this .DisplayAlert( "Dial a Number" , "Would you like to call " + translatedNumber + "?" , "Yes" , "No" )) { try { if (PhoneDialer.Default.IsSupported) PhoneDialer.Default.Open(translatedNumber); } catch (ArgumentNullException) { await DisplayAlert( "Unable to dial" , "Phone number was not valid." , "OK" ); } catch (Exception) { // Other error has occurred. await DisplayAlert( "Unable to dial" , "Phone dialing failed." , "OK" ); } } } |
https://learn.microsoft.com/zh-cn/training/modules/build-mobile-and-desktop-apps/6-exercise-create-phone-number-translator-app
分类:
.Net MAUI Blazor
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
· .NET周刊【3月第1期 2025-03-02】
2015-10-14 sql标量值函数,将汉字转化为拼音,无音标