こんにちは、Androidアプリケーションの開発は初めてです。いくつか質問があります。
私のGCMは正常に動作します:
protected void onMessage(Context context, Intent intent) {
Log.i(TAG, "Receenter code hereived message");
Log.i(TAG, intent.getStringExtra("name"));
Log.i(TAG, intent.getStringExtra("fone"));
//google example (with this, the "message" ll be append in screen, like a miracle)
displayMessage(context, intent.getStringExtra("nome") + " " + intent.getStringExtra("telefone"));
}
名前と名前を記録しますが、フォームフィールドにその「メッセージ」を入力したいと思います。
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dip" >
<TableLayout
android:id="@+id/TableLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="8dp" >
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp" >
<TextView
android:id="@+id/display"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</TableRow>
<EditText
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10" >
<requestFocus />
</EditText>
<EditText
android:id="@+id/fone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10" />
</TableLayout>
</ScrollView>
どうすればいいですか?(アクティビティを取得し、フィールドを取得し、フィールドに入力します...)