Back to project page kakao-android-sdk-standalone.
The source code is released under:
Apache License
If you think the Android project kakao-android-sdk-standalone listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/** * Copyright 2014 Kakao Corp.//w w w . j av a2s.c o m * * Redistribution and modification in source or binary forms are not permitted without specific prior written permission. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.kakao.sample.usermgmt; import java.util.Map; import android.content.Intent; import android.view.View; import android.widget.Button; import android.widget.Toast; import com.kakao.APIErrorResult; import com.kakao.SignupResponseCallback; import com.kakao.UserManagement; import com.kakao.helper.Logger; import com.kakao.template.loginbase.SampleSignupActivity; /** * ??? ????? ??? ??? ? * me? ???? ?? ???? ???? ?? ?????? ?????? Main ?????? ?????? ???. */ public class UsermgmtSignupActivity extends SampleSignupActivity { protected void redirectLoginActivity() { Intent intent = new Intent(this, UserMgmtLoginActivity.class); startActivity(intent); finish(); } protected void redirectMainActivity() { final Intent intent = new Intent(this, UsermgmtMainActivity.class); startActivity(intent); finish(); } protected void showSignup() { setContentView(R.layout.signup); final ExtraUserPropertyLayout extraUserPropertyLayout = (ExtraUserPropertyLayout) findViewById(R.id.extra_user_property); Button signupButton = (Button) findViewById(R.id.buttonSignup); signupButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { onClickSignup(extraUserPropertyLayout.getProperties()); } }); } /** * ?? ?????? ??? ??? ?? API? ????. */ private void onClickSignup(final Map<String, String> properties) { UserManagement.requestSignup(new SignupResponseCallback() { @Override protected void onSuccess(final long userId) { redirectMainActivity(); } @Override protected void onSessionClosedFailure(final APIErrorResult errorResult) { redirectLoginActivity(); } @Override protected void onFailure(final APIErrorResult errorResult) { String message = "failed to sign up. msg=" + errorResult; Logger.getInstance().d(message); Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG).show(); } }, properties); } }