Skip to main content

Home/ Android Dev/ Contents contributed and discussions participated by Vincent Tsao

Contents contributed and discussions participated by Vincent Tsao

Vincent Tsao

Introducing Droid-Fu for Android: BetterActivity, BetterService and BetterAsy... - 2 views

  • So the basic idea is: launch an AsyncTask making your service call, show a nifty progress dialog while the task thread is running, and have the task’s result be posted back to your activity once it completes. Cool, but what if the user decides to rotate the screen while your task is running? Or a phone call comes in, interrupting your app, and Android decides to kill it? Both these actions will effectively terminateyour activity, and recreate it when resuming (yes, a screen rotation kills your activity, very clever, isn’t it?). Unfortunately, any AsyncTask that was still running now holds a stale reference to your activity, because the restarted activity will be an entirely different object in memory (and it will go through onCreate(), as if the activity had started for the first time). I’m not entirely sure whether AsyncTask will actually post back the data to the old activity object (if it was a weak reference, it may already have been garbage collected), but in any case, your “new” activity will never see it, because it’s a different instance.
    • Vincent Tsao
       
      This situation always raise a FC bug, an alternative solution is IntentService + broadcast 
Vincent Tsao

kaeppler/droid-fu - GitHub - 6 views

  • Droid-Fu offers both support classes meant to be used alongside existing Android code, as well as self-contained, ready-to-be-used components like new adapters and widgets. The areas tackled by Droid-Fu include: application life-cycle helpers support classes for handling Intents and diagnostics better support for background tasks super-easy and robust HTTP messaging powerful caching of Objects, HTTP responses, and remote images custom adapters and views I suggest you read this introductory article, and anything that follows.
  •  
    BetterAsyncTask本质就是AsyncTask,我想在用法上应该没有太大区别 但AsyncTask有个硬伤就是它的life-cycle对当前的activity的life-cycle有依赖,容易引起FC,而BetterAsyncTask解决了这个问题,Ref: http://groups.diigo.com/group/android_related/content/introducing-droid-fu-for-android-betteractivity-betterservice-and-betterasynctask-brain-flush-2838716 当然还有其他解决办法,我自己偏向于 IntentService + Broadcast mechanism的解决方案
  •  
    哈哈,其实是我几个月前看了你的blog后,才有了更多的认识的
Vincent Tsao

How QR Codes Can Grow Your Business | Social Media Examiner - 1 views

  • Consumers want immediate access to what’s relevant and QR codes are being used to make that possible.
  • Bar codes are linear one-dimensional codes and can only hold up to 20 numerical digits, whereas QR codes are two-dimensional (2D) matrix barcodes that can hold thousands of alphanumeric characters of information. Their ability to hold more information and their ease of use makes them practical for small businesses.
  • When you scan or read a QR code with your iPhone, Android or other camera-enabled Smartphone, you can link to digital content on the web; activate a number of phone functions including email, IM and SMS; and connect the mobile device to a web browser.
  • ...4 more annotations...
  • There are other software companies that have created 2D codes that work much like QR codes, with Microsoft being the most notable.  Microsoft developed their own proprietary software to create codes known as MS tags.  Unlike QR codes, which can be read by a number of different readers, MS tags can only be read by the Microsoft Tag Reader.
  • Calls to Action – After building a community, the next logical step is to mobilize them to take action.   What are you trying to accomplish?  You can alternate special offers by simply linking your QR codes to new landing pages, and you can combine then with email opt-ins to build your list.
  • SEO and SMO – Earlier this month I wrote an article on social graphs where I discuss how web objects such as images, music clips, and videos add valuable content to your social graph.  QR codes enhance both your search engine and social media optimization.  Now you can increase traffic to those searchable objects to further optimize them by encouraging more sharing.
  • Social Proof – To help build a community offline, it can be helpful to use your vibrant online communities as social proof of your influence and expertise.  As one example, you can use QR codes to link to specific blog posts that have earned an abundance of activity.
Vincent Tsao

Implementing "Pull To Refresh" in your Android App | Blog // Recursive Awesome // Table... - 1 views

  • For completeness we really should handle the possibility of the task getting cancelled. This can happen when the user navigates away from the app and the task is killed before its completed. This will cause the onPostExecute() method to not be called and so the onRefreshComplete() method won’t be called. Depending on how the user navigates through the app, they could return to this activity without going through the complete onCreate() lifecycle, and you’ll end up with the screen still showing the “loading” progress message in the header. This is common when using tabs between multiple ListViews. Also, the documented best practices for implementing an AsyncTask says that in long running background work you should periodically check if the task has been cancelled and try to gracefully quit your work and exit. So let’s get all of that in there.
Vincent Tsao

svg-android - SVG parsing and rendering for Android - Google Project Hosting - 1 views

  • This is a compact and straightforward library for parsing SVG files and rendering them in an Android Canvas. By using vector art, the pain of supporting various screen sizes and densities in Android can be reduced. This was the library used to render the artwork and the interface of Androidify. The project also includes a Live Wallpaper app extracted from Androidify. The app shows off the SVG library, and demonstrates the rendering pipeline used to draw the Androids.
Vincent Tsao

Johan Nilsson - 1 views

  • I'm Johan, a Stockholm, Sweden based Web and Android developer that love APIs, hackathons and open source. Contact me using Twitter or email.
Vincent Tsao

Google 内部的哲学家:业界需要思考移动产品的道德问题 | 爱范儿: 拇指资讯小众讨论 - 1 views

  • Google 员工 Damon Horowitz 曾经是多家创业公司的联合创始人。他最近一次创业是 Aardvark 问答网站,然后就被 Google 收购。Damon Horowitz 的有趣之处在于,他拥有一个哲学博士学位,在公司内部大家称他为“哲学家”。
  • 一旦话题涉及到了科技领域的伦理道德,Horowitz 就会问大家是喜欢 iPhone 还是 Android 。当大多数人回答说“喜欢 iPhone ”时,Horowitz 就开玩笑地说你们是“冤大头”,只是因为外表漂亮而选择设备
  • 这个结果很可怕。我们更在乎手机功能的强大,而不在乎这些功能是否在道德框架之内。”
  • ...1 more annotation...
  • “崇高的道德是很难的,这要求深层次的思考,这需要我们每一个人的理智。如今我们拥有这么大的权力,到底哪些事情可以做,哪些事情不可以做,需要思考清楚。”
Vincent Tsao

YouTube - Google I/O 2011: Android Market for Developers - 1 views

  •  
    June, June, June!!!
Vincent Tsao

[Tip][Google I/O 2011]Apply A/B testing to your Android App - 5 views

android tip
started by Vincent Tsao on 12 May 11 no follow-up yet
  • Vincent Tsao
     
    private static final boolean isA = UUID.randomUUID().getLeastSignificantBits() % 2 == 0;

    public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);

    if(isA){
    setContentView(R.layout.mainA);
    MyApp.getInstance().tracker().trackPageView("/AUser");
    }else{
    setContentView(R.layout.mainB);
    MyApp.getInstance().tracker().trackPageView("/BUser");
    }

    ...
    }
Vincent Tsao

andro-views - Project Hosting on Google Code - 1 views

  • The workspace in a viewgroup which creates virtual views (or screens). The user is able to navigate between screens by swiping the screen with his finger.
Vincent Tsao

Google I/O 2011 Session Schedule - 1 views

  •  
    Google I/O 2011 倒计时
Vincent Tsao

commonsguy/cwac-merge - GitHub - 2 views

  • MergeAdapter accepts a mix of Adapters and Views and presents them as one contiguous whole to whatever ListView it is poured into. This is good for cases where you have multiple data sources, or if you have a handful of ordinary Views to mix in with lists of data, or the like.
Vincent Tsao

Android Developers Blog: Commerce Tracking with Google Analytics for Android - 1 views

  •  
    各位有已经有用Google Analytics for Android来跟踪用户数据了么?
‹ Previous 21 - 40 of 450 Next › Last »
Showing 20 items per page