....

顯示具有 Android 標籤的文章。 顯示所有文章
顯示具有 Android 標籤的文章。 顯示所有文章

2014年12月9日 星期二

2014年9月21日 星期日

[長知識] Android Service 在背景偷偷下載資料不是問題~

在這裡跟大家分享 Android Service的做法,其實非常非常的簡單~

事先準備
1. 你要在哪裡啟動Service
2. 你要在哪裡關閉Service
3. 準備一個class來繼承Service

Let's gooooooooooooooooooo...


[長知識] Android getApplicationContext() VS getBasecontext() 的差異

最常見到選擇這四種選擇的情況是在Toast吧~
Toast.makeText( getApplicationContext() , "Hi~", Toast.LENGTH_SHORT).show();
所以就上網搜尋了一些資料,大概是以下~~~
1. getApplicationContext():
基本上,他會永遠跟著Android Activity的生命週期~

2. getBasecontext():
在Activity跑到 onDestory()的時候,就會被殺掉~

2014年8月15日 星期五

[長知識] Android Eclipse Unable to execute dex: GC overhead limit exceeded

有時候寫完專案要匯出成 apk檔的時候
會有錯誤訊息產生
導致不能正常的匯出 apk檔

當遇到
Unable to execute dex: GC overhead limit exceeded
的解決方式是以下

2014年6月23日 星期一

[長知識] Android Google Maps API v2 - Debug key and Release key

在Android 上,要能夠使用Google Maps在裝置上跑地圖的話呢~
最重要的步驟就是去申請一把 KEY 
而這把KEY分為兩種
1. Debug key : 顧名思義就是讓我們去測試的時候所用的。
2. Release Key : 就是要把專案匯出成apk檔案,以及上傳到Google play供使用者下載所使用的。

給大家的心得 :
前陣子我利用USB線把檔案編譯在裝置上,他能夠正常地顯示出跑出google地圖,而匯出成apk檔在安裝到裝置的時候,根本跑不出google地圖,看似很明顯地沒有把release key弄好,搞了好久終於發現~~(灑淚),所以分享一下要注意些甚麼事情~~~~~

2014年6月16日 星期一

[長知識] Google Maps Android API v2 Setting

在一開始,我想要說的是...
要玩GoogleMaps其實不難,但是要看懂互相call來call去的方法,
要看懂~~ 真的要懂~~ ^^



2014年6月9日 星期一

[長知識] Android 利用SQLite的好處勝過於File


SQLite好處多多呢:)


*If you have data related with each other, file will not allow you to relate them. At that time SQLite will help you.
*If you wan to query your data, store the data in structured manner you will prefer SQLite

2014年5月29日 星期四

[長知識] Android 利用SQLite語法找出兩個日期內的資料 (SQLite Manager)

再查詢資料庫前
我們必須要有資料庫存在
而這邊我也有存了資料進去
最後才能進行語法搜尋


首先
要能夠看到資料庫裏面的欄位以及資料
我是使用Firefox的外掛程式 --> SQLite Manager
點選設定裡面的外掛程式 搜尋 即可以下載

2014年5月26日 星期一

[長知識] Android 多個 DatePickerDialog 在同一個Activity

今天在寫datePickerDialog的時候發現的小小幫助,希望可以幫助大家:)
當我們發現在同一個Activity下需要寫兩個以上的datePickerDialog,可能會需要switch case來幫忙