No Description

WXEntryActivity.java 1.4KB

    package ai.pai.lensman.wxapi; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import com.android.common.utils.LogHelper; import com.tencent.mm.sdk.modelbase.BaseReq; import com.tencent.mm.sdk.modelbase.BaseResp; import com.tencent.mm.sdk.modelmsg.SendAuth; import com.tencent.mm.sdk.openapi.IWXAPI; import com.tencent.mm.sdk.openapi.IWXAPIEventHandler; import com.tencent.mm.sdk.openapi.WXAPIFactory; import ai.pai.lensman.db.Preferences; public class WXEntryActivity extends Activity implements IWXAPIEventHandler { private IWXAPI api; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); api = WXAPIFactory.createWXAPI(this, "wxf4832536d9dda70a"); api.handleIntent(getIntent(), this); } @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); setIntent(intent); api.handleIntent(intent, this); finish(); } @Override public void onReq(BaseReq baseReq) { } @Override public void onResp(BaseResp resp) { if(resp instanceof SendAuth.Resp){ SendAuth.Resp newResp = (SendAuth.Resp) resp; String code = newResp.code; Preferences.getInstance().setWXCode(code); LogHelper.d("czy","WXEntryActivity onResp wx code = "+code); finish(); } } }
kodo - Gogs: Go Git Service

説明なし

Brightcells: 018d52f61d Update package django_xxx 8 年 前
..
migrations 41c58ec3f7 Add box api loginqr 9 年 前
__init__.py 41c58ec3f7 Add box api loginqr 9 年 前
admin.py 41c58ec3f7 Add box api loginqr 9 年 前
models.py 41c58ec3f7 Add box api loginqr 9 年 前
tests.py 41c58ec3f7 Add box api loginqr 9 年 前
views.py 018d52f61d Update package django_xxx 8 年 前