IS01.png

IS01(JN-DK01)で電池残量更新間隔を確認した結果、

一般的な 1% 間隔ではなく、10% 間隔であることがわかりました。

つまり、システムからは、100%→90%→80%...のように、10% 間隔でのみ更新情報が届きます。

したがって、10% 分の電池を消費、または充電する時間が長い場合、

電池残量が更新されていないように感じることがあるかもしれませんが、

端末側の仕様のため、ご理解ください^^;

 

調査したアプリケーション

  • 標準の電池残量表示 (プリインストールアプリ)
  • Battery Status Free (海外アプリ)
  • Simple Battery Status (国内アプリ)

 

※他にも、海外の Milestone / DROID 端末も、電池残量更新間隔は、10% 間隔のようです

※調査に協力していただいた @lychee さん、@hyoromo さん、ありがとうございました!

 

追記

  • 2010/7/28:公式の回答でも10%間隔であることを確認できました

元ネタは、以下のサイトから。

 

Preferenceをリセットする - 明日の鍵

http://d.hatena.ne.jp/tomorrowkey/20100721/1279700859

 

プリファレンスを使用するアプリケーションを作成していると、テスト用に、プリファレンスデータをリセットしたくなります。

実際、ワタクシも、毎回アプリケーションをアンインストールしていた人です。。。

 

そこで、プリファレンスをリセット(というより削除)するには、上記エントリのようにすれば、目的を達成できます。

ありがたいですね。

 

で、自分でもプリファレンスデータをリセットする方法を考えてみました。

ちょっと真面目すぎるコードですが、"/data/data"~"/shared_prefs/"の部分をハードコードしてない点がポイントです。

 

プリファレンスをリセット(削除のみ)するソースコード(※1) 

SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
SharedPreferences.Editor editor = sharedPreferences.edit();
Map<String, ?> keys = sharedPreferences.getAll();
if (keys.size() > 0) {
    for (String key : keys.keySet()) {
        editor.remove(key);
    }
    editor.commit();
}

 

あと、プリファレンスがデフォルト値を持っていない場合には、これでも良いのですが、

デフォルト値を持っている場合には、続けて、明示的にデフォルト値を作成してあげる必要があります。

※ちなみに、デフォルト値を書き出したかどうかは、/data/data/パッケージ名/shared_prefs/_has_set_default_values.xml の _has_set_default_values キー値に保存されています

 

明示的にデフォルト値を書き出すソースコード

PreferenceManager.setDefaultValues(this, R.xml.preference, true);

 

お題が与えられて一緒に考えるのは楽しいし、勉強になりますね。

 

※1:2010年7月22日追記

SharedPreferences.Editor#clear()→commit() で簡単に削除できるようです^^;

http://d.hatena.ne.jp/ytRino/20100722/1279762434

Android NDK, r4b がリリースされました(2010年7月15日)。

http://developer.android.com/sdk/ndk/index.html

 

CHANGED.TXT によると、

This release fixes a few bugs in r4 scripts. There are no new features.

ということで、

このリリースは、Android NDK, r4 のバクフィックスが目的であり、新しい機能追加は無いようですが、

Android NDK, r4 をお使いの方は、更新された方が良さそうです。

 

以下、CHANGED.TXT の引用です。

 

OTHER FIXES & CHANGES

  • build/tools/rebuild-all-prebuilt.sh: mktemp expects 'XXXXXX' instead of 'XXX'.
    Fix the script (and others in the same directory) to do that properly.
  • ndk-gdb: check the target device's API level, and dump an error message if
    it is not at least 8 (Android 2.2 a.k.a. Froyo). Fix script to properly
    remove control characters like '\r' from adb shell's output. Also fix
    script to work properly with OS X's BSD awk.
  • ndk-build: Make AndroidManifest.xml optional. Now the build scripts will try
    to look for jni/Android.mk if no manifest is found. If you don't use this,
    you can also define NDK_PROJECT_PATH to point to your tree.
    Also, on Windows, check that a Cygwin-compatible make executable is being
    used, and dump a readable help message to solve the issue if this is not
    the case.
  • Place generated binaries under $PROJECT_PATH/obj/ instead of
    $PROJECT_PATH/bin/ndk/. The 'bin' directory is sometimes cleaned
    by the JDT, resulting in the inability to properly load symbol versions
    of the shared libraries when running ndk-gdb.
  • Warn when sources with unsupported extensions are used in LOCAL_SRC_FILES.
    Previous behaviour was to silently ignore them.
  • Set the optimization mode to 'debug' automatically if the manifest sets
    android:debuggable to 'true'. You can override this by using
    'APP_OPTIM := release' in your Application.mk, or by adding '-O2' to
    your LOCAL_CFLAGS.

Note that even in release mode, the NDK build scripts will produce
binaries with symbols under obj/local/<abi>/ that will be used for
debugging with gdb. However, the debugger will have a harder time to
print proper local variable values that have been optimized out or
even set breakpoints properly.

[Android] キセカエADVANCE

| トラックバック(0) |

「キセカエADVANCE」とは、Android のホーム画面のデザインを簡単に着せ替えできるホームアプリケーションです。

 

特徴

  • テーマを選択することにより、壁紙、アイコン、ドロワーなどを一括で変更できます
  • テーマを簡単にダウンロードできます
  • ホーム画面を5画面に拡張できます
  • ウィジェットのセル数を 4x4 から 4x6 に拡張できます

 

ホームの機能としてはシンプルですが、一括でデザインを変更できるのがいいですね。

コンテンツについては、準備中のものも含めて、100 のテーマがありました。

最初に聞いた際には、「100 もあって凄いなぁ~」と思ったのですが、

いざ、カテゴリー単位で選択していくと、少し足りないかなぁという印象でした^^;

今後のテーマの拡充と、ドロクリのように誰でも参加できる仕組みがあれば・・・と思います。

リリースお疲れ様でした!

 

以下、画面キャプチャーです。

AndroidMarket.png Home.png

100DESIGN.png Theme.png

 

Eclipse 上の LogCat では、日本語文字列の文字化けを回避できない?ようですが、

コマンドプロンプト上では、コードページと画面のフォントを変更することで、文字化けを回避できるようです。

 元ネタは以下のサイトから。

 

 

以下、おまけで、上記設定をショートカットで起動するための手順です。

 

ショートカット作成手順 

1. デスクトップを右クリックし、「新規作成」→「ショートカット」をクリックする。

step1.png

 

2. 「ショートカットの作成」画面が表示されたら、[参照]ボタンを押して、

 Windowsのシステムフォルダ下にある「Cmd.exe」を選択し、「次へ」をクリックする。

step2.png

 

3. ショートカットの名前を入力するエディットボックスに任意の名前(例えば、「logcat」)を入力し、「完了」をクリックする。

step3.png

 

4. 作成されたショートカットを右クリックし、「プロパティ」をクリックする。

step4.png

 

5. 「ショートカット」タブのリンク先に「 /k "chcp 65001 & adb logcat"」を追加する。

step5.png

 

6. 「フォント」タブを表示し、「フォント」リストから「MS ゴシック」を選択する。

step6.png

 

以上でショートカットの作成は完了です。

次回から、ショートカット起動で、日本語表示できます。

<<前のページへ 1112131415161718192021

ほしい物リスト

2012年4月

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 30