Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, August 16, 2011

Add static libraries *.jar to Android.mk based build

in Android.mk


LOCAL_STATIC_JAVA_LIBRARIES := mylocaljar


LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := mylocaljar: mylocaljar.jar


mylocaljar.jar should be in root directory of the project. Look at the Calculator app's Android.mk in Android tree as an example



Fragments for All

http://android-developers.blogspot.com/2011/03/fragments-for-all.html



Automatic thread

Nice piece of code from Android e-mail client



public static AsyncTask runAsync(final Runnable r)
{ return new AsyncTask() {
@Override
protected Void doInBackground(Void... params) {
r.run();
return null;
}}.execute();
}
runAsync(new Runnable() {
@Override
public void run() {}}
);



Monday, August 15, 2011

Friday, May 06, 2011

Grep search

grep -i -n -r 'my search term' --include=*.java .



searches for 'my search term' in current directory and sub directories in all files