2011年11月19日星期六
2011年10月22日星期六
2011年4月30日星期六
Android專案第二部分非常不順利..
我在寫某Android程式,有一部分是要隱藏STATUSBAR,但是卡到瓶頸.
因為STATUSBARMANAGER是系統的API,他不包含在SDK裡面,所以調用時一直失敗,之後我改用Reflection,程式碼大致如下(這部分是展開狀態列):
開心地設了 <uses-permission android:name="android.permission.STATUS_BAR" />
android:permission="android.permission.STATUS_BAR">> 之後,馬上 compile!結果出現錯誤,java.lang.SecurityException: Permission Denial: starting Intent
{ act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000
cmp=com.xxxx/.xxxx } from null (pid=-1, uid=-1) requires android.permission.STATUS_BAR
這讓我無言了,我乾脆跑去美國問啦,問題內容如下
靠杯,我才發現這禮拜我都在搞笑,原來就算用Reflection調到系統Service,沒permission還是一場空。
浪費了一個禮拜,改變計畫。
後記:由於Launcher類軟體是脫離SDK的,所以他可以輕易的調用到STATUSBARMANGER..
因為STATUSBARMANAGER是系統的API,他不包含在SDK裡面,所以調用時一直失敗,之後我改用Reflection,程式碼大致如下(這部分是展開狀態列):
Method expandStatusBar;結果又卡住了,上面的for迴圈裡面的if (method.getName().compareTo("expand")==0)完全跑不進去,想了幾天想不到,乾脆去發問,結果發現我沒有在Manifast設android:permission...
Object mStatusBarManager= new Object();
Object statusBarManager = new Object();
public void onItemClick(AdapterView arg0,
View arg1, int arg2, long arg3) {
this.setTitle("You Click Item:" + String.valueOf(arg2));
mStatusBarManager=this.getSystemService("STATUS_BAR");
Method[] methods=statusBarManager.getClass().getDeclaredMethods();
for (Method method : methods)
{
if (method.getName().compareTo("expand")==0)
expandStatusBar = method;
}
try {
expandStatusBar.invoke(statusBarManager);
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
開心地設了 <uses-permission android:name="android.permission.STATUS_BAR" />
android:permission="android.permission.STATUS_BAR">> 之後,馬上 compile!結果出現錯誤,java.lang.SecurityException: Permission Denial: starting Intent
{ act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000
cmp=com.xxxx/.xxxx } from null (pid=-1, uid=-1) requires android.permission.STATUS_BAR
這讓我無言了,我乾脆跑去美國問啦,問題內容如下
I used得到回答是..
<uses-permission android:name="android.permission.STATUS_BAR" />
<activity android:name=".xxxx"
android:permission="android.permission.STATUS_BAR">
When I compile,the error occurred..
[2011-04-29 20:37:30 - xxxx] ActivityManager:
java.lang.SecurityException: Permission Denial: starting Intent
{ act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x10000000
cmp=com.xxxx/.xxxx } from null (pid=-1, uid=-1) requires
android.permission.STATUS_BAR
Why!?
You are trying to use a permission that applications aren't allowed to. You are then saying that launching your activity requires that the caller hold this permission, which no app (including the launcher) is going to.
SDK applications cannot hold that permission, AFAIK, and I don't know
why you have an activity that requires that permission.
靠杯,我才發現這禮拜我都在搞笑,原來就算用Reflection調到系統Service,沒permission還是一場空。
浪費了一個禮拜,改變計畫。
後記:由於Launcher類軟體是脫離SDK的,所以他可以輕易的調用到STATUSBARMANGER..
2011年4月9日星期六
(服務) 信用卡代刷 / 代刷卡 / 網路刷卡 / MasterCard / 任何網站皆可 / 循環自動刷卡問題也不用擔心
-呃..聯絡方式都寫在文章下面了阿..-
未滿20歲,或是想網路刷卡但是聯徵過不了沒信用卡的人看這裡~
我們可以幫您購買價格換算成台幣在"7000"元以內的東西
需要先付款,限轉帳或是臨櫃匯款
每次籌收的手續費: 4000元以下60元 ; 4000元以上 100元
需要Yahoo或露天拍賣下標得需自付3%交易手續費
若是刷國外的,銀行(0.5%)和發卡組織(1%)總共會收1.5%手續費,這費用需要您自行承擔
(如果在國外網站以新台幣交易,則只收發卡組織1%)
匯率方面以當天計算,有多會退,有少要補.
個資絕對保密
基本上所有網站都可以刷
另外有些網站會有"定期刷卡"的機制,這個我會幫您取消,請放心
聯絡方式:
Yahoo Messenger (奇摩即時通) : jason860421
Windows Live Messenger (MSN) : jason860421@yahoo.com.tw
手機 : 0975728225 ( 沒接請以簡訊or語音信箱,沒有留信箱或簡訊基本上不會主動回電)
未滿20歲,或是想網路刷卡但是聯徵過不了沒信用卡的人看這裡~
我們可以幫您購買價格換算成台幣在"7000"元以內的東西
需要先付款,限轉帳或是臨櫃匯款
每次籌收的手續費: 4000元以下60元 ; 4000元以上 100元
需要Yahoo或露天拍賣下標得需自付3%交易手續費
若是刷國外的,銀行(0.5%)和發卡組織(1%)總共會收1.5%手續費,這費用需要您自行承擔
(如果在國外網站以新台幣交易,則只收發卡組織1%)
匯率方面以當天計算,有多會退,有少要補.
個資絕對保密
基本上所有網站都可以刷
另外有些網站會有"定期刷卡"的機制,這個我會幫您取消,請放心
聯絡方式:
Yahoo Messenger (奇摩即時通) : jason860421
Windows Live Messenger (MSN) : jason860421@yahoo.com.tw
手機 : 0975728225 ( 沒接請以簡訊or語音信箱,沒有留信箱或簡訊基本上不會主動回電)
分類:
其他
2011年4月3日星期日
Firefox4 很棒的3個理由,但還有1個會輸的原因
在2004年時,IE6的安全性真的很爛,爛到一個很危險的地步了,
但是多數Windows使用者已經
所以根本沒啥人會去用其他瀏覽器像是Netscape和Mozilla。
但直到Firefox出現後,IE使用者最關心的安全性問題幾乎都解決了,
因此在一個月內Firefox的市占率在當時就逼近50% ,隨著時間過去,越來越高
But..Firefox這幾年來越來越爛,Firefox4真的能改善這些問題並奪回使用者的芳心(?)嗎?
答案當然是肯定的:
1.作業系統和擴充性
Firefox4跟IE9不同,他可以能運作在各版本的Windows(IE9只能在Vista以上系統運行,光這點Vista以下的Windows使用者就一堆跳槽FF了),甚至是Linux,因為他是開源軟體。
如果你想要用甚麼功能是瀏覽器沒有內建的,那就要用到Firefox擴充元件了!
但,IE有嗎?這點Firefox4又從IE9那裏吸一堆人過來了。
2.速度
對於純粹讀取普通網頁的速度,Firefox還是輸給IE,但如果列入JavaScript的處理速度就大勝了
另外,經過我幾個小時的試用,memory leak似乎有很大的改善,不會像以前動不動就死當啦~
3.網頁相容性
在Acid3中,Firefox4硬是比IE9 高了2分(95分和97分)
,另外在HTML5的測試上更比IE高了125分!!(255分和130分)
在測試期間,暫時都沒有碰到任何瀏覽上的問題!除了那些逼唉的IE Only網頁
4.SO..What's wrong?
Firefox是好物,但為什麼仍舊許多人跳槽回IE或是Chrome?
到底為啥?
他的速度比以往都快了很多,也有許多好用的新功能。但比上速度的話..嗯..瀏覽器的速度比賽
用英文來所只能說是一場Dead-haet啦
至於擴充功能方面,其實Chrome也有很多了..
如果Firefox4沒有拖這麼久,如果他在2010年就出現,那又是另外一回事了
因為他們為了改良小細節而延後上架時間,讓其他瀏覽器有追上的機會,所以這使得許多人跳往Chrome陣營了..
Blogger新增了五種瀏覽模式!
Blogger日前新增了五種瀏覽模式,分別是 Flipcard,Mosaic,Sidebar,Snapshot及Timeslide
進入的方法很簡單,以我的來舉例,要進入Flipcard就輸入http://www.jasonblog.net/view/flipcard
這些東西很明顯就是字面上的意思,我覺得Slidebar比較讚,
不過用這個,側欄那些就都看不到囉..
進入的方法很簡單,以我的來舉例,要進入Flipcard就輸入http://www.jasonblog.net/view/flipcard
這些東西很明顯就是字面上的意思,我覺得Slidebar比較讚,
不過用這個,側欄那些就都看不到囉..
2011年3月22日星期二
Google CheckOut新增5種貨幣!但沒NTD..
就在剛剛...(騙你的,12小時前)收到了Android Market的一封信,看似只有Developer會收到
原文:
Android Market的付費模組開始變更了,主要內容是付款時會自動切換成買方的貨幣
這封信是為了讓你知道,3/31起,將會新增澳元,港幣,日元,紐(西蘭)元,新加坡元這五種貨幣
呃,至於匯率問題,他是說每天更新,至於是參考哪家銀行就沒透露了
原文:
Hello,全部翻譯很累,說重點:
As mentioned in a previous email, Android Market is changing to a new model for pricing applications called “Buyer’s Currency.” The change directly affects how you price your apps, as well as how users around the world purchase them.
We're writing to let you know that we’ve recently added several new currencies to the program: AUD, HKD, JPY, NZD, and SGD. Please visit the Android Market Developer Console to set prices in these new currencies by March 31, 2011.
IMPORTANT On March 31, 2011, Android Market will automatically assign Buyer’s Currency prices for your products in the new currencies if you have not manually set them in the Developer Console. Android Market assigns a price based on the price of your app in your home currency, converted to each target currency using the exchange rate on that day. This is a one-time conversion associated with the transition to the new Buyer’s Currency model. If you have already set your per-currency prices manually, Android Market will not override them.
You can continue to set and adjust the prices of your apps at any time, in your home currency and in any Buyer’s Currency available.
For more information about how Buyer’s Currency works, please visit the Android Market Help Center:
http://www.google.com/support/androidmarket/bin/topic.py?topic=15867
Thank you for your continued support of Android Market.
Regards,
The Android Market Team
©2011 Google Inc.
1600 Amphitheatre Parkway
Mountain View, CA 94043
Android Market的付費模組開始變更了,主要內容是付款時會自動切換成買方的貨幣
這封信是為了讓你知道,3/31起,將會新增澳元,港幣,日元,紐(西蘭)元,新加坡元這五種貨幣
呃,至於匯率問題,他是說每天更新,至於是參考哪家銀行就沒透露了
2011年3月10日星期四
Firefox 4 等好久!RC1釋出了!!
剛剛收到消息,Firefox4終於釋出RC版了!
官方說:Mozilla Firefox 4 for Windows, Mac and Linux has exited the beta cycle and is now available as a release candidate in more than 70 languages. The millions of users testing Firefox 4 will be automatically updated to this version and will join our Mozilla QA team in validating the new features, enhanced performance and stability and HTML5 capabilities in Firefox 4. Testers are encouraged to check out the Web O’ Wonder in order to see the future of the Web with cutting edge demos that showcase the incredible online experiences developers can now create and users can experience. Developers can submit their own demos to the Mozilla Developer Network Demo Studio.
也就是說有繁中啦~Firefox愛用者快來抓
點這裡
呃,不過先說,很多Add-on 都還沒測試過,所以有用很多附加元件的..
請斟酌一下..
官方說:Mozilla Firefox 4 for Windows, Mac and Linux has exited the beta cycle and is now available as a release candidate in more than 70 languages. The millions of users testing Firefox 4 will be automatically updated to this version and will join our Mozilla QA team in validating the new features, enhanced performance and stability and HTML5 capabilities in Firefox 4. Testers are encouraged to check out the Web O’ Wonder in order to see the future of the Web with cutting edge demos that showcase the incredible online experiences developers can now create and users can experience. Developers can submit their own demos to the Mozilla Developer Network Demo Studio.
也就是說有繁中啦~Firefox愛用者快來抓
點這裡
呃,不過先說,很多Add-on 都還沒測試過,所以有用很多附加元件的..
請斟酌一下..
2011年2月13日星期日
Intel Sandy Bridge 晶片組 的 Cougar Point 修好了/ B3 revision 2/14開始出貨
Intel手腳很快,在10天內就修好秀斗的晶片囉,畢竟花了7億美元,
新晶片基本上跟原本的一樣,應該只有做小修改 。
依Intel官方新聞稿(這裡,英文的)顯示,基本上有幾項修改:
→修訂ID從04h更新為05h
→BIOS版本更新為1.1.4
→晶片表面的金屬層(Minor metal layer,中文好像沒標準翻譯)改善了,讓晶片組壽命延長
→修訂的B3腳位兼容B2的腳位
總之就是這樣,最後大家可以參考一張表,看看就好。(從Intel新聞稿截下來的)
新晶片基本上跟原本的一樣,應該只有做小修改 。
依Intel官方新聞稿(這裡,英文的)顯示,基本上有幾項修改:
→修訂ID從04h更新為05h
→BIOS版本更新為1.1.4
→晶片表面的金屬層(Minor metal layer,中文好像沒標準翻譯)改善了,讓晶片組壽命延長
→修訂的B3腳位兼容B2的腳位
總之就是這樣,最後大家可以參考一張表,看看就好。(從Intel新聞稿截下來的)
訂閱:
文章 (Atom)

