2011-10-11 2 views
1

OpenFeint를 Android 게임에 통합했습니다. OpenFeint 플레이어 ID를 얻으려면 무엇을 추가해야하는지 궁금합니다. ID 또는 사용자 이름을 사용하여 사용자가 OpenFeint를 사용하여 장치간에 게임 계정을 전송할 수 있도록 할 수 있습니다. 당신이 오픈 페인트 100 %를 판매하지 않는 경우Android에서 OpenFeint 플레이어 ID 받기

OpenFeintSettings ofsettings = new OpenFeintSettings(gameName, gameKey, gameSecret, gameID); 
OpenFeint.initialize(this, ofsettings, new OpenFeintDelegate() {}); 

답변

2

@Andy hi i 내가

을 개발 게임에 오픈 페인트를 구현 때 플레이어 ID를 필요로 나는 다음과 같은 코드를 사용

import com.openfeint.api.OpenFeint; 
     import com.openfeint.api.resource.User; 
     import android.app.Activity; 
     import android.os.Bundle; 

    public class ABC extends Activity { 


    User u; 
     String Name; 



    @Override 
    public void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 

     setContentView(R.layout.score); 



     u = OpenFeint.getCurrentUser(); 

    // user id received 

     Name = u.name; 

    System.out.println("** The User id is ** " + Name ); 

} 
} 
0

, Swarm 체크 아웃 기능 (리더, 업적, 클라우드 데이터 저장 등의 유사한 세트를 제공합니다 :

다음은 오픈 페인트를 사용하여 내 코드입니다). Swarm's Cloud Data은 사용자가 원하는 정보를 사용자의 계정에 저장할 수있게 해 주므로 사용자는 어떤 기기를 사용하든 모든 데이터를 사용할 수 있습니다.