2010年12月15日水曜日

2010年12月14日火曜日

今回の環境

DB PostgreSQL 9.0.1
WEB側開発 ASP.NET(.NET3.5)
ドライバ Npgsql(.net用)
WAS IIS 7.0(Vistaで検証)
WEBサービス WCFWEBサービスで作成

*手間取ったこと
・開発したWCFのデプロイ⇒ 発行でOK
・IISでWCFを動かす設定(コンパネより)
  ASP.NET
  .NET拡張性
  ISAPI拡張
  ISAPIフィルター
 をインストール

 .NET 3.0の中のWCFActivationをインストール(これにはまった)

2010年12月10日金曜日

Android端末の実機で開発中のアプリをデバッグ

1 端末側でUSBデバッグをON
2 PCとUSBケーブルで接続
3 ドライバをインストール
IDEOS携帯は、Mobile Partner(E:)のE:\drivers\adb_driverを指定してインストールした。
4 コマンドラインで、adb devicesとやって、List of devices attachedの下にデバイス名がでればOK。
5 ApplicationManifest.xmlを編集して、デバッグ可能(debugableをtrue)にする。
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">

6 実行すると端末側でアプリが実行される。

ついでに

実機の画面キャプチャをとるには、DDMSを起動してDeviceメニューからScreenCaptureをクリック。

AlertDialog勉強中...

まず AlertDialogを作るためのBuilderを作って
final AlertDialog.Builder builder  = new AlertDialog.Builder(this);

タイトル(っていうか表示する文字)を設定して
builder.setTitle("電話しますか?");

する場合と、しない場合のボタン表示とリスナーを設定
// 「する」場合の処理
builder.setPositiveButton("する", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
}
});

// 「しない」場合の処理
builder.setNegativeButton("しない", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
}
});

アラートダイヤログを生成して
AlertDialog dialog = builder.create();

表示
dialog.show();

で終わり。

画面遷移時にエラー(ActivityNotFoundException)

ApplicationManifest.xmlのApplicationタグの要素に

<activity android:name=".MenuActivity"></activity>

こんな感じで追加。最初にピリオドがないと落ちる。