Androidアプリケーションの開発を勉強中。
No.10
2011/05/28 (Sat) 22:49:54
package net.edo.hrio.mixiclient;
import jp.mixi.android.sdk.*;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.*;
public class mixiClient extends Activity {
private MixiContainer container;
private int AUTHORIZE_REQUEST_CODE;
private TextView text;
private Button button1;
private Button button2;
private boolean Auth;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
text = (TextView)findViewById(R.id.text1);
button1 = (Button)findViewById(R.id.button1);
button2 = (Button)findViewById(R.id.button2);
Config config = new Config();
config.clientId = "APIキー";
config.selector = Config.GRAPH_API;
container = MixiContainerFactory.getContainer(config);
container.init(this); //ここ!
/*Auth = container.isAuthorized();
*/
Auth = false;
ButtonClickSet(Auth);
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
/>
<Button
android:id="@+id/button1"
android:layout_width="150dip"
android:layout_height="wrap_content"
android:onClick="mixiAuthentic"
android:text="mixi認証"
/>
<Button
android:id="@+id/button2"
android:layout_width="150dip"
android:layout_height="wrap_content"
android:onClick="AuthDestroy"
android:text="mixi認証"
/>
</LinearLayout>
PR
| HOME |
カレンダー
| 10 | 2025/11 | 12 |
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 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 |
最新記事
(03/13)
(01/08)
(06/08)
(05/29)
(05/28)
最新TB
プロフィール
HN:
柊里緒
性別:
女性
職業:
学生
自己紹介:
使用端末:IS05
この小ささがとても嬉しい。他のスマホ片手で使えません。
PC:Windows7(32ビット版)
最近やや不審な動きをするのが怖い。
備考:VOCALOID大好きです。
twitterやってます。
この小ささがとても嬉しい。他のスマホ片手で使えません。
PC:Windows7(32ビット版)
最近やや不審な動きをするのが怖い。
備考:VOCALOID大好きです。
twitterやってます。
カウンター
ブログ内検索
P R