• joyofthink
  • daydayup
  • Linkblog
  • Photoblog

Joy of Think


  • Home
  • About Blog A
  • About this system
  • Contact
  • Log in

Android Resource Manager Tools:aapt

August 29th, 2011

===Aapt When I research multiple locale support, I found that aapt is a great tool which can used to dump internal information of apk file.

For exmple, aapt dump configurations apk_name can dump all the configuration used built in apk file.

===Locale support AssertManager.getLocales() will invoke jni code in AssertManager.cpp, it will invoke ResTable.getLocales() in 'ResourceTypes.cpp`. This method will check all the avaliable configuration and figure out which kinds locales are supported.

Posted in Android | Send feedback »

How to delete SMS from android inbox?

July 23rd, 2011

The first method is to use "content://sms/{sms_id}", but unfortunately, this metod doesn't work due to a unknown reason.

The workable solution is to use uri "content://sms", and use condition "id = {smsid}". It can delete SMS from inbox.

Posted in Android | Send feedback »

How to trun on Android SQLite Trace

July 23rd, 2011

Based on the code of

Posted in Welcome | Send feedback »

JNI code output log in logcat

July 6th, 2011
Just copy this code in your C file, and uses LOG? to print out log.
#include <android/log.h>

#define  LOG_TAG    "SCWS"
#define  LOGI(...)  __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
#define  LOGW(...)  __android_log_print(ANDROID_LOG_WARN,LOG_TAG,__VA_ARGS__)
#define  LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)

Posted in Android | Send feedback »

Tips about JNI code

July 6th, 2011

Today, I fixed two stupid defects in my JNI code.

First one, I notice that return java string always contain a extra character, finally, it is caused by a mistake in my code: put 0 in [length+1] instead of [length]. VERY STUPID.

Second one, I notice the output of string is not correct. I write unicode string literatelly from txt file of windows notepad. At end, I found that java always uses Big Endian utf-16, but windows notpad using Little Endian utf-16.

Posted in Android | Send feedback »

1 2 3 4 5 6 7 8 9 10 11 ... 27 >>
  • February 2012
    Sun Mon Tue Wed Thu Fri Sat
     << <   > >>
          1 2 3 4
    5 6 7 8 9 10 11
    12 13 14 15 16 17 18
    19 20 21 22 23 24 25
    26 27 28 29      
  • Joy of Think

    • Recently
    • Archives
    • Categories
    • Latest comments
  • Search

  • Categories

    • All
    • Background
    • Bookmark
    • English
    • Fun
      • Family
      • Movies
      • Music
      • On the web
      • Sports
    • News
    • Programming
      • Android
      • C++
      • Compiler
      • Formal Method
      • GUI
      • Java
      • Linux
        • Toolchain
      • Perl
      • Ruby
      • TTS
      • Web
        • Catalyst
        • HTML
        • Javascript
          • YUI
      • Windows
      • Windows Kernel
    • Toolkits
      • Process
      • vim
    • Welcome
  • Blogroll

    • b2evolution
      • Blog news
      • Manual
      • Support
      • Web hosting
    • contributors
      • Daniel
      • Danny
      • Francois
      • Yabba
  • XML Feeds

    • RSS 2.0: Posts, Comments
    • Atom: Posts, Comments
    More on RSS
powered by b2evolution

©2012 by yangchen | Contact | Design by Michael | Credits: free blog | green hosting | François