License of the Android Open Source Project

Is the license of the Android Open Source Project Creative Commons Attribution 2.5 or Apache 2.0? Brief answer Written in Content License page. AOSP have 2 categories for its licenses.  Source code, documentation –  Apache 2.0 license Site content                              – Creative Commons Attribution 2.5 Description I confused when I visit the top page of Android Open Source Project page, since it was written at the bottom that, Except as noted, this content is licensed under Creative Commons Attribution 2.5 The answer is written in Content License page, which says that For the purposes of licensing, the content of […]

Continue reading →

Convert between Bitmap and Drawable

Drawable to Bitmap It is easy to convert between Drawable and Bitmap in Android.

Above works for jpg, png type drawables, but it does work for xml type of drawable (I guess because xml file has no specific “width”, “height” information). In this case, you can use following util method.

 Above is cited from How to convert a Drawable to a Bitmap? answered by André. Bitmap to Drawable

Resize Bitmap

  A Drawable that wraps a bitmap and can be tiled, stretched, or aligned. You can create a BitmapDrawable from a file path, an input stream, through XML inflation, or from a Bitmap object. Reference How to convert a Drawable to […]

Continue reading →

Gradle Sync fails in Android studio 1.3

Recently I updated Android studio to version 1.3, and then it fails gradle sync. Error message is something like,

It seems that https proxy server was not working correctly, even if I’m setting proxy server in [File] → [Settings…] → [Appearance & Behavior] → [HTTP Proxy].  Solution  You can set http proxy server & https proxy server manually in file. Add below to your (Project Properties) file.

Replace with IP address of your proxy server & 8080 with your proxy’s port number. After that, try [Build] → [Clean Project] to re-execute Gradle Sync. Reference gradle behind proxy in Android Studio 1.3 Android Studio Proxy settings doesn’t work to […]

Continue reading →

Recommendation card
– Android TV app Tutorial hands on 11


Recommendation Android TV’s home, LeanbackLauncher has a recommendation row at first row. Any application can suggest recommended contents for users. In this chapter, I will explain how to show recommendation card to LeanbackLauncher from your application. Recommending TV Content – Android developers Android TV Recommendations: What’s in it for my app or game? This recommendation is achieved by using Notification framework whose structure was already existed in Android phone/tablet SDK. So showing recommendation in LeanbackLauncher is actually sending notification. Basic sequence is following  Declare NotificationManager Use your customized RecommendationBuilder class (it is custom class which usesNotificationCompat class)  to prepare recommendation. Make Notification by building RecommendationBuilder Notify this Notification using NotificationManager.   What is implemented […]

Continue reading →