2015-08-28

[IoT] Windows 10 IoT on Raspberry Pi Wifi 問題小記錄


現在有線網路越來越少,結果網路上看文件http://ms-iot.github.io/content/en-US/win10/SetupWiFi.htm
結果我眼殘沒有看到原來TP-LINK WN725N 是支援 MinnowBoard Max
Image 103

2015-08-27

[Xamarin] Xamarin Form 初體驗

最近在看一下Xamarin 官方的文件看到一個應該不算新發表,但是很有趣的東西 就是Xamarin Form
Image 096

2015-08-26

[Xamarin] 透過 SurfaceView 取得相機影像

今天筆記一下之前跌蠻多地方的SurfaceView ,主要目的是取道相機的影像,當然中間還要經過一些處理不過這篇Blog不會記錄那些處理的部份,介紹一下今天範例,主要就是一個SurfaceView   , APP 打開後會呈現相機中的畫面,不過我希望這SurfaceView是以 高:寬 – 4:3 呈現
1. 畫面介紹,只有一個 SurfaceView 基本上就是盡量簡單,打開APP後就會出現相機畫面
Image 093

2015-08-25

關於如何將 office word 變成限定Administrator 執行


上一篇文章 關於如何將Execl 變成限定Administrator 執行 我們用了三個方法讓Excel 執行起來,但是如果你要改word 你會發現 他並沒有 winword.exe.manifest,這時候我們要用點小技巧

1.上篇文章我們不是改過 excel.exe.manifest 的內容,這時候我們複製這檔案變成 winword.exe.manifest 其內容為


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <noInherit></noInherit>
    <assemblyIdentity version="11.0.0.0" processorArchitecture="*" name="excel" type="win32"></assemblyIdentity>
    <description>Microsoft Excel</description>
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="requireAdministrator" uiAccess="false"></requestedExecutionLevel>
            </requestedPrivileges>
        </security>
    </trustInfo>
    <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
        <application>
            <!--The ID below indicates application support for Windows 7 -->
            <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></supportedOS>
            <!--This Id value indicates the application supports Windows 8 functionality-->
            <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>
            <!-- This Id value indicates the application supports Windows 8.1 functionality-->
            <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"></supportedOS>
            <!-- This Id value indicates the application supports Windows 10  functionality-->
            <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></supportedOS>
        </application> 
    </compatibility>
    <asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
        <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
            <dpiAware>true</dpiAware>
        </asmv3:windowsSettings>
    </asmv3:application>
</assembly>

關於如何將Execl 變成限定Administrator 執行


筆記一下,如何將Excel 限定 Admonistrator 執行,我的作業環境是Windows 10 + office 2016 所以如果你的環境跟我不同,你就要自己找尋一下執行路徑

方法1 :  對執行檔案按下滑鼠右鍵,就可以以系統管理員身分執行,這方法最簡單
Image 076

[Xamarin] 上傳檔案/圖片 到Server 端 (Android 端)


上篇文章 [Xamarin] 上傳檔案/圖片 到Server 端 (Server 接檔案端)  我們從Server可以收檔案,現在就是Client 端的部分,我們要把圖檔上傳
1. 介紹畫面,按下按鈕後我們會把Assets/ld.jpg 傳到 server 上面
Image 074

[Xamarin] 上傳檔案/圖片 到Server 端 (Server 接檔案端)


蠻常會用到的就是上傳檔案/圖片到Server端,所以筆記一下,首先筆記一下Server Site 的Code
首先開的檔案是 risivfile.ashx
Image 073
開啟檔案後就是Code 的部分,下面的Code 我已經盡量精簡化,簡單的說就是會把收到的東西存成sample.jpg

2015-08-24

[Xamarin] Android 簡單播放mp4 影片筆記

筆記一下,在Xamarin 中在Android 裡播放mp4影片檔,接下來有三個筆記三個項目
1. 播放線上的mp4 網址


FindViewById<Button>(Resource.Id.btnPlay).Click += delegate
{
    //設定播放網址
    videoView.SetVideoURI(Uri.Parse("http://techslides.com/demos/sample-videos/small.mp4"));
 
    //Seek 到第0秒
    videoView.SeekTo(0);
 
    //開始撥放
    videoView.Start();
};

記得要開INTERNET 的 PERMISSION 這邊操控是沒有啥困難的 ..

2015-08-21

[Xamarin] 筆記一下Android 中頁面切換得過場動畫(轉場特效)

每一家客製化Android 後,都會有自己在Activity 切換得過場動畫,這邊筆記一下如何制定自己的過場動畫並且讓APP中過場動畫達到一致

1. 首先,因為在android 世界裡面 可以透過xml 去敘述畫面物件的漸變,大部分是這樣處理的所以我們在網路上找到一些大大開發的xml 這邊我是用官網的範例

你可以在這裡 https://github.com/xamarin/recipes/tree/master/android/other_ux/animation/rotate_animation/RotationAnimation/Resources/anim 下載到兩個 動畫的xml

Image 059

2015-08-19

[Xamarin] 在Android 中使用WebView 並且插入一段Javascript Code.

一些需求,需要我在APP 中Load 完某個網站之後,動態插入某些 Javscript Code ,所以筆記一下相關的測試
1.介紹一下這次範例的畫面,一個很單純的頁面,裡面只有一個WebView id 為 webViewMain ,APP開啟後,我會載入 http://m.facebook.com 之後我會把上面的Facebook Banner 部分透過 javascript 改成紅色,並且會Toast  一段文字作為提示
如下圖:
Screenshot_2015-08-19-15-20-08

2015-08-18

Universal Windows Platform Dev and Design相關資源整理

 

網路上面看到一些關於 Universal Windows Platform 的相關資源,整理一下給大家

1 . Visual Studio 2015 Community 現正無料免費
https://www.visualstudio.com/?Wt.mc_id=DX_MVP4030677
Image 042

2015-08-17

[Xamarin] 發行 APK and Publish to Google Play 筆記


寫APP寫完後免要上架了,因為有些步驟有點瑣碎,乾脆整理一下筆記
1.製作上架要用的Key , 簡單的說必須要透過 JDK 裡面的工具製作一把Key ,這把Key 壓完apk 後請好好保存,首先,使用系統管理員身分開啟命令提示字元 然後切換到你JDK安裝位置,我電腦是在C:\Program Files (x86)\Java\jdk1.7.0_55\bin
Image 022

2015-08-14

[Xamarin] Android 中 使用 UrlImageViewHelper 載入網路大圖

這個問題很常有人問,關於本機大圖,可以參考官方這篇 http://developer.xamarin.com/recipes/android/resources/general/load_large_bitmaps_efficiently/
不過現在圖片很多都是從網路上來,尤其是在做 List的時候,可能會載入大量網路圖片,這時候要怎麼解決呢?
這時候我推薦這個
Image 017

2015-08-13

[Xamarin] Android 中 快照(Snapshot) View

專案需求,順便筆記一下,將View進行快照,並且在ImageView 物件中顯示
範例說明: 上面是一個LinearLayout按下按鈕後,會將上方的LinearLayout 快照成Bitmap放在下方圖案

Image 009