2015年1月21日 星期三

Android 自動啟用服務

在開機時自動啟動activity和service
http://rx1226.pixnet.net/blog/post/235016962

Android ─ 開機時自動啟動Service

http://shovachu-coding.blogspot.tw/2014/02/android-service.html

Android 如何顯示通知訊息(Notifications)?

http://magiclen.org/android-notifications/


Android學習筆記(7)-關於Service和Notification的體驗

http://forum.hkgphone.com/thread-55-1-1.html


2015年1月19日 星期一

GCM Andrdoid google雲端推播

Server PHP
http://stackoverflow.com/questions/11242743/gcm-with-php-google-cloud-messaging

Android Side

main

Android C2DM (一):元件參數說明

http://blog.kenyang.net/2011/12/android-c2dm.html

Android GCM (Google Cloud Messaging):Android Client Side

http://blog.kenyang.net/2013/07/android-gcm-google-cloud_1.html

Android C2DM (四):實作之Android篇

http://blog.kenyang.net/2012/03/android-c2dm-android.html


Android GCM (Google Cloud Messaging):Server Side

http://blog.kenyang.net/2013/07/android-gcm-google-cloud.html

push notification - android client 以 GCM 實現 (二)

http://blog.maxkit.com.tw/2014/04/push-notification-android-client-gcm_2.html%E5%BF%83%E6%9C%89%E9%9D%88%E7%8A%80

push notification - android client 以 GCM 實現 (一)

http://blog.maxkit.com.tw/2014/04/push-notification-android-client-gcm.html

Android Push Notification - 推播通知訊息給Android客戶端

http://magiclen.org/android-push-notification/

http://oldgrayduck.blogspot.tw/2012/11/android-gcmgoogle-cloud-messaging.html



http://blog.jeremyhuang.com/2014/03/android_29.html
http://breezebobo.blogspot.tw/2014/10/android-gcm.html

2014年7月2日 星期三

開啟 Google Play app 至指定的 app

http://ephrain.pixnet.net/blog/post/47272322-%5Bandroid%5D-android-%E5%AD%B8%E7%BF%92%E7%AD%86%E8%A8%98%EF%BC%9A%E9%96%8B%E5%95%9F-google-play-app-%E8%87%B3

2014年3月11日 星期二

Unable to load config info from openssl.cnf resolve (解決方法)




在使用openssl 產生csr檔案時出現找不到openssl.cnf

openssl req -new -key server.key -out server.csr
WARNING: can't open config file: /usr/local/ssl/openssl.cnf
Unable to load config info from /usr/local/ssl/openssl.cnf

解決方式
set OPENSSL_CONF=C:\Apache2.2\conf\openssl.cnf   //輸入openssl.cnf 的位置







2013年12月15日 星期日

透過Javascript 擷取網頁畫面並轉為圖片

要做到像pchome24小時購物,結帳時擷取網頁快照(snapshot)的功能

可以透過html2canvas這個Javascript的API

透過這個API可以將所選定的HTML標籤畫面內容轉換成Canvas(如,<div>裡面的東西</div>)

使用範例如下
<html>
<head>
<style type="text/css">
div {
    height: 100px;
    width: 100px;
    background-color: #2C7CC3;
}
</style>
<script type="text/javascript" src="html2canvas.js"></script>
<script type="text/javascript" src="jquery-1.9.1.js"></script>
<script language="javascript">
$(document).ready(function() {
//var testdiv = document.getElementById("ourdiv");
//把ourdiv轉為canvas
    html2canvas($("#ourdiv"), {
        onrendered: function(canvas) {
            // canvas is the final rendered <canvas> element
            var myImage = canvas.toDataURL("image/png");
            window.open(myImage);
        }
    });
});
</script>
</head>
<body>
<div id="ourdiv">
</div>
</body> 
</html>

2013年12月4日 星期三

Maven Eclipse Plugin 增加jvm heap的方法

更改eclipse.ini設定無效時可以在build時,用參數的方式加大heap

"Run As" > "Maven Build", click on the "JRE" tab, enter VM args
-Xms128M -Xmx512M