忍者ブログ
AdminWriteComment
Androidアプリケーションの開発を勉強中。
No.
2024/03/29 (Fri) 19:25:46

×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

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
この記事にコメントする
お名前
タイトル
文字色
メールアドレス
URL
コメント
パスワード   Vodafone絵文字 i-mode絵文字 Ezweb絵文字
この記事へのトラックバック
この記事にトラックバックする:
[14]  [13]  [12]  [11]  [10]  [9]  [7]  [6]  [5]  [4
カレンダー
02 2024/03 04
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
31
最新CM
[06/28 kuvia]
[05/31 柊里緒]
[05/29 NONAME]
最新TB
プロフィール
HN:
柊里緒
性別:
女性
職業:
学生
自己紹介:
使用端末:IS05
この小ささがとても嬉しい。他のスマホ片手で使えません。
PC:Windows7(32ビット版)
最近やや不審な動きをするのが怖い。
備考:VOCALOID大好きです。
twitterやってます twitterやってます。 
カウンター
ブログ内検索
バーコード
P R
忍者ブログ [PR]