針對查詢「xamarin」依關聯性排序顯示文章。依日期排序 顯示所有文章
針對查詢「xamarin」依關聯性排序顯示文章。依日期排序 顯示所有文章

2016年11月21日 星期一

Xamarin.Forms有 Previewer了

分享文章:Live XAML Previewing with the Xamarin.Forms Previewer官方 Xamarin.Forms Previewer

在今天 10月參加 Microsoft Tech Summit 台北場次,第二天有幾場是關於 Xamarin,我就參加其中的一場 (An Overview of the Microsoft Application Platform for Developers),講師有介紹目前開發 Xamarin專案可以有兩種選擇方式一種就是 Xamarin.Forms,另一種是  Platform-specific,Xamarin.Forms Guides的 Is Xamarin.Forms right for your project?小節上有建議。

那場演講上有提供 platform-specific的專案是可以有 GUI工具可以拉元件進行設計,但 Xamarin.Form的方式就沒有,所以會後就問講師 David Carmona Xamarin Forms是否未來也會有 GUI的設計方式,他的回答說應該會有吧,不過不知道那時會出現,想不到今天就看到這篇文章,我只能說除了 Docker之外,愈來愈愛 C#了。

開啟 previewer: View(檢視) - Other windows(其它視窗) - Xamarin.Forms Previewer

2017年1月5日 星期四

Xamarin.Forms 遇到 java.lang.ClassNotFoundException: Didn't find class "android.support.graphics.drawable.VectorDrawableCompat"

參考文章:Didn't find class "android.support.graphics.drawable.VectorDrawableCompat"


目前又是開發企業分機和 MVPN查詢,只不過是換了 APP方式,我決定採用 Xamarin.Form作為我第一支 APP開發。查詢程式不難,原本在 Android 6.0模擬器上可以正常執行,很天真的以為可以直接在手機上跑了,就把程式直接放到我的手機上安裝,我的 Android版本為 5.1,開啟後一直閃退,一直閃退。隔天又拿了一支 Android 4.4的手機過來測,沒想到居然可以成功開啟並執行。 也不知道怎麼找原因,後來發現有 log可以看,最後才找到上面的錯誤字串。也花了很久才找到這篇文章,作法如下:

1. 打開專案 *.Droid 的 Nuget
2. 把 Xamarin.Forms給移除
3. 把 Xamarin.Android.Support開頭的 Library也給刪除
4. 重新安裝 Xamarin.Forms (可能會發現多個幾個 Libs是開啟在建立專案時沒有的)
5. 保險起見,把整個 VS關掉,再重新開啟後打開專案並作 clean & rebuild

完成後應該就可以解決這個問題了。

2017年1月22日 星期日

Xamarin.Forms 使用 HttpClient遇上 NameResolutionFailure錯誤

參考文件:NameResolutionFailure when using HttpClient after network connection is restored

這種情況會出現在手機斷網後又重新連上網路就會出現這樣的情況,解決方式就是在 *.Droid和 *.iOS的專案上相對應的檔案加上  ServicePointManager.DnsRefreshTimeout = 0;

2016年12月26日 星期一

Use Line Bot to search extensions and MVPN numbers of the enterprise

Last time I shared my first Line Bot 使用 ASP.Net Core Web API 實作 Line Bot webhook callback. It is a funny bot to show what kind of person is by entering a name. if you enter a name "Catton", it would answer "He is a handsome man."

Because of first bot, it gave me a inspiration to develop another Lin Bot that could facilitate to contact  other colleagues easily. Especially for the enterprise that already has implemention of MVPN.

First of all, here is the wiki to introduce what is MVPN, Mobile virtual private network.  You can dial a short number, maybe 5 or 4 digits, to communicate the colleague whose mobile phone is in your enterprise MVPN group.

Inside the enterprise, I can build a web to search someone's extension or MVPN number by entering name, employee number or department name. Here is the screenshot of web-searching.