2012-01-30
Hello Emacs.
きになってたので触ってみます。
2012-01-08
Processing for Androidで外部ストレージ(SDカード)に画像を保存する
Processing for AndroidのサンプルのTopics > FileIO > SaveOneImage を改変した。
void setup() { size(200, 200); } void draw() { background(204); line(0, 0, mouseX, height); line(width, 0, 0, mouseY); } void mousePressed() { save("//sdcard//DCIM/example.png"); }
ここで、
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
このようにスケッチのAndroidManifest.xmlに外部ストレージの書き込み許可を与えないと強制終了する。
Processing for Androidでアプリのアイコンを変える
使っているProcessingのバージョンは2.0a3。
File > Export Android Project より、Sketch Folder以下にAndroidディレクトリが生成される。
ここで、Androidディレクトリ以下のbin/resあたりのアイコンをいじると変更される。
あとはbuildとinstall。
ant debug #プロジェクトをビルドする adb install -r example.apk #example.apkをインストールする
こんなところで。
追記(2012.2.12)
こんな面倒なことしなくてもできるっぽい
All sketches use a default icon unless you specify otherwise. To create your own, save images as icon-36.png, icon-48.png, and icon-72.png. These should be 36x36, 48x48, and 72x72 pixel icons. Place them in the sketch folder (not the data folder or any other subfolder). The next time you build your app, these will be used instead of the defaults.
2011-09-29
node.jsでアプリを複数扱うときにforeverがまじ便利
foreverは永遠にスクリプトを連続起動するツールです(機械翻訳)。
要はnode用のデーモンを管理する感じの。
npmでinstallするだけの簡単なお仕事。
npm install forever -g
これでもっといろんなものをnodeでつくりたくなりますね!!!
