Sqlite Commands in Terminal

(Shimen.Taiwan) Recently, I need to use sqlite commands to check data for my android app. Thanks to the rooted android ROM, the shell environment is much useful than before. It’s possible to use Tab key to auto complete filenames and directories, and I can use sqlite3 command directly in adb shell. It saved time from pulling the database file out back and forth. However, it’s been quite a while that I almost forgot how to deal with a sqlite database. The following link is a handy Url to help me on this: ...

May 24, 2014

在Lime HD中快速啟動語音輸入法

(富貴角.Taiwan) 剛剛試了一下谷歌的語音輸入,覺得有些時候應該蠻實用的。所以打算幫它在Lime HD中加個快速切換的功能。在Lime HD中原本就有開啟Google語音輸入法的方式,只是我覺得有點太麻煩了。原本的方式是: ...

June 9, 2013

Adding macros in Android Studio (Intellij) -- take Adding Javadoc comment for example

(Geneve.Swiss) Climbing is pleasant, but it leads you to better views. Some shortcuts can be integrated into ideaVIM, but some are more complicated and need other tricks to make it more handy. One of the technique is to use macros. As Mac’s Automator, you can ask Intellij or Android Studio to record your actions, and make it available as a keyboard shortcut. For example, if you want to add javadoc comment to a funtion, you need to move to the first line of a certain function, and type in /**. After pressing Enter, it will generate javadoc template for that specific function. Though it’s already very convenient, it still takes time if you’re not quite familiar with how to move the cursor to the first line of the function. ...

June 7, 2013

Some hacking articles about IdeaVIM under Intellij

(Leiden.Netherlands) IdeaVIM is a vim-like input plugin for intellij IDE, good for text editing but not so powerful if you want to use it for other IDE tasks, for example accessing menu actions by defining keyboard shortcuts. Fortunately, someone in Japan branched the source codes on GitHub, and wrote some tweaks to make it possible to configure all kinds of Intellij menu items to keyboard shortcuts as you wish in a config file. ...

June 6, 2013

How to make testing work under Android Studio

(Geneve.Swiss) It’s such a pain to look for solutions for tasks on Android Studio. When can it be mature enough and more well documented for developers? I would like to write some test cases for my small app, but I couldn’t find a way for adding test cases into Android Studio project and have it run successfully. After wandering around on the internet for a long time, eventually I found a link that did helped me out (see reference below). As Google I/O 2013 video said, a new android build system made of gradle is released, which will be more flexible, more powerful, more etc, etc. However, currently, it ’s not well integrated into Android Studio. Some modification in Android Studio won’t be directly reflected in gradle build scripts. Well… then, how do I know when I should modify build scripts my self? And to write it by myself, I have to learn groovy first, because that’s the language Gradle used to write its build configuration files. How could I master these things in a short time… ...

June 3, 2013

Gradle build error in comman line for Android Studio app projects

I saw someone met the same problem on StackOverflow. Fortunately, I found out how to make it work. So leave some notes here: upgrade Gradle version to 1.6 Afterward, running “gradle build –stacktrace”, you will see that ANDROID_HOME environment variable is required to be set up. on Mac, add following line to your ~/.bash_profile export ANDROID_HOME="/Applications/Android Studio.app/sdk/" Now it should work like a charm!

June 1, 2013

OrientationEventListener on Android to get current rotation degree

(Central Park.New York) Strangely, it’s not possible to get current rotation angle in android directly, except for getting the fixed 4 rotation modes: 0, 90, 180, 270. In order to get precise rotation degrees instead of rotation modes, OrientationEventListener can be used. Once it’s implemented, you can get the rotation degree in onOrientationChanged(). It’s a lot easier than manipulating values from all the sensors like gyroscope, accelerator, etc. REF: ...

May 28, 2013

Tips for using AdMod module in Android Studio

(Geneva.Swiss) It’s pain in the ass to use Android Studio now, since it’s just published, which implies bugs appear every now and then, and you’re not sure it’s due to your misunderstanding of this IDE, or it’s really an issue. In addition, it’s relatively hard to find How-to answers comparing to ADT plugin with Eclipse. While trying to set up AdMob module in my project on Android Studio, it took me some time to fix some external library import errors that should be clearly mentioned in online AdMob doc, or even better, just integrate it into “Android Studio”. Isn’t Android Studio meant to make Android developers’ life easier? ...

May 24, 2013

Enhance Reading Experience for Android Dev website

Recently I spend most of my time reviewing documents on google’s android official site. It annoys me that the left side of the screen is always occupied by the content index; however, I just need to change articles once in a while by using it. It makes me feel bad that one third of the screen is wasted. In addition, it also distracts me while I was reading. As a consequence, I searched internet to see if there’s any extension, plugin, or script to help me hide the navigation panel when I want to do so. Out of luck, no. Maybe it’s too tiny to have someone work on it. ...

May 20, 2013

Eclipse/Java code completion not working with Android development

(GreatWall.Beijin.China) While watching some video tutorials about android development, I found that the lecturer can call out the class completion helper dialog during typing class names. However, I only have the function/variable autocompletion feature after typing a . after a class name in my eclipse. Without entering the class name correctly, I can not get any help from eclipse, which is quite strange comparing to what I’ve seen for others. ...

May 14, 2013