Skip to main content

Home/ Android Dev/ Group items matching "blog" in title, tags, annotations or url

Group items matching
in title, tags, annotations or url

Sort By: Relevance | Date Filter: All | Bookmarks | Topics Simple Middle
Vincent Tsao

NubiNews Blog: Help us diagnose problems - 0 views

  • If you see a weird problem with NubiNews, you can help us diagnose the problem by sending us the "Log File".Install an application called SendLog from the Android Market.Start NubiNews. Proceed until your problem occurs.Go back to the Home Screem and launch SendLog.Tap on the "Send" buttonChoose e-mail address nubinews@gmail.comThanks!中文:可以在Android Market安装一个叫SendLog的程序,然后跑大牛新闻,问题出现之后启动SendLog,点“Send”,发送到我们的邮箱
Vincent Tsao

javadoc注释规范 - kelaocai - JavaEye技术网站 - 0 views

  • /** * show 方法的简述. * <p>show 方法的详细说明第一行<br> * show 方法的详细说明第二行 * @param b true 表示显示,false 表示隐藏 * @return 没有返回值 */ public void show(boolean b) { frame.show(b); }
  • javadoc 标记由“@”及其后所跟的标记类型和专用注释引用组成 javadoc 标记有如下一些: @author 标明开发该类模块的作者 @version 标明该类模块的版本 @see 参考转向,也就是相关主题 @param 对方法中某参数的说明 @return 对方法返回值的说明 @exception 对方法可能抛出的异常进行说明 @author 作者名 @version 版本号 其中,@author 可以多次使用,以指明多个作者,生成的文档中每个作者之间使用逗号 (,) 隔开。@version 也可以使用多次,只有第一次有效 使用 @param、@return 和 @exception 说明方法 这三个标记都是只用于方法的。@param 描述方法的参数,@return 描述方法的返回值,@exception 描述方法可能抛出的异常。它们的句法如下: @param 参数名 参数说明 @return 返回值说明 @exception 异常类名 说明
Vincent Tsao

The CommonsBlog - Activity or Notification via Ordered Broadcast - 0 views

  • I’ve run into the following generalized question a lot recently: I have an event that occurs in the background. I want to update my activity, if the activity is on the screen. Otherwise, I want to raise a Notification.
  • Hence, the recipe for the activity-or-Notification pattern is: Define an action string you will use when the event occurs that you want to go to the activity or notification (e.g., com.commonsware.java.packages.are.fun.EVENT). Dynamically register a BroadcastReceiever in your activity, with an IntentFilter set up for the aforementioned action string and with a positive priority (the default priority for a filter is 0). This receiver should then have the activity do whatever it needs to do to update the UI based on this event. The receiver should also call abortBroadcast() to prevent others from getting it. Be sure to register the receiver in onStart() or onResume() and unregister the receiver in the corresponding onStop or onPause() method. Register in your manifest a BroadcastReceiver, with an <intent-filter> set up for the aforementioned action string. This receiver should raise the Notification. In your service (e.g., an IntentService), when the event occurs, call sendOrderedBroadcast(). And that’s it. If the activity is on-screen, its receiver will be registered, so it will get the event, process it, and cancel the broadcast. If the activity is not on-screen, its receiver will not be registered, so the event will go to the default handler, in the form of your manifest-registered BroadcastReceiver, which will raise the Notification.
Vincent Tsao

[筆記]讓Android emulator連intranet « 更夜 - 0 views

  • [通用部分] 如果開了一個以上的模擬器的話請自行加adb參數 0a. 先adb pull /system/etc/hosts hosts抓回local來修改。 0b. 在原本的 127.0.0.1 localhost 加上新的行,寫入你需要的對應如 192.168.1.15 mytestsite,存檔。 1. adb remount (才不會發生Read-only file system錯誤) 2. adb push hosts /system/etc/hosts
  • [2.0.1, 2.1 only] 這兩個版本會在這邊丟出錯誤訊息,分別為 failed to copy 'hosts' to '/system/etc/hosts': No space left on device failed to copy 'hosts' to '/system/etc/hosts': Out of memory 解決方法是,開啟模擬器時不要直接從 AVD Manager介面開,請下指令: $ emulator -avd youravdname -partition-size 128 接著再對這個模擬器使用上面的 hosts修改大法就不會出現錯誤了。 partition size的單位是MB,預設似乎是64。從adb shell 用 df 指令觀察的結果,/system 和 /data 都會被這個設定成這邊指定的值。而1.5, 1.6 的 image 因為剛好沒超過 64MB,還剩下一點空間,所以 hosts 還寫得進去,而 2.x 的 image 有 七萬多K,mount之後 /system 這個 partition 看起來就是全滿,剩下空間 0K。因此 hosts變肥後無法寫入,真的是因為partition爆了。事實上正常的手機確實也不需要留空間給user hack…模擬器還讓我們調參數已經很偷笑了,可惜AVD Manager 的 Start 沒地方可以設定 partition size。若有此需求的話只好麻煩一點手動下指定開emulator囉。
Vincent Tsao

Android Gesture Detector - 醋溜的 - JavaEye技术网站 - 0 views

  •  
    good explanation for the actions: fling, scroll, ....
‹ Previous 21 - 40 of 79 Next › Last »
Showing 20 items per page