안드로이드 openfeint 이용하기 참고 :: 소림사의 홍반장!

안드로이드 openfeint 이용하기 참고

2012. 5. 21. 15:20 - 삘쏘굿

---------------------------------------------
---- Building OpenFeint With Your Project:
---------------------------------------------
1. Register an application using the OpenFeint developer dashboard at https://api.openfeint.com

2. Download the latest version of OpenFeint for Android

3. Extract the package

4. Copy libs/OpenFeint.jar into the libs/ subfolder of your Android project

5. Copy the res/ and assets/ folder into your Android project folder

6. Open up your AndroidManifest.xml file and add the following activities inside yourtag:
Optionally, if your app is fullscreen, you can use "android:style/Theme.NoTitleBar_Fullscreen" as the theme for these activities.

7. Add the following permissions to AndroidManifest.xml outside of your tag:
Additionally, if you're targeting SDK 4 or later, make sure to add this line to yourelement in AndroidManifest.xml:

8. Add OpenFeint.jar to your CLASSPATH. In Eclipse:
* Right-click on your project and click Properties.
* Click 'Java Build Path'
* Click 'Libraries'
* Click 'Add JARs...'
* Navigate to OpenFeint.jar and click Ok

9. Initialize OpenFeint. This is typically done in the onCreate() method of your main activity (main menu):

OpenFeintSettings settings = new OpenFeintSettings("App Name", "App Key", "App Secret", "App ID");
OpenFeint.initialize(this, new OpenFeintDelegate() {});

Note that you must provide your game's name, key, secret, and id to OpenFeintSettings. You can find these in the developer dashboard at https://api.openfeint.com

10. Make sure that OpenFeint is notified whenever your top-level activity changes. Typically this is done in onResume():

@Override
public void onResume() {
super.onResume();
OpenFeint.setCurrentActivity(this);
}

This only needs to be done for fullscreen Activities (i.e. overlays) and not for Activities that OpenFeint.initialize(). If you're a one-Activity application, you don't need to worry about it.

다른 카테고리의 글 목록

Dev. 참고자료 카테고리의 포스트를 톺아봅니다