Posted By

abrady0 on 09/14/13


Tagged

facebook-unity-sdk


Versions (?)

FBUnityPlayerActivity


 / Published in: Java
 

what the activity the facebook unity sdk looks like

  1. package com.facebook.unity;
  2.  
  3. import android.content.Intent;
  4. import android.os.Bundle;
  5. import android.util.Log;
  6.  
  7. import com.facebook.Session;
  8. import com.unity3d.player.UnityPlayerActivity;
  9.  
  10. public class FBUnityPlayerActivity extends UnityPlayerActivity {
  11. static final String TAG = "FBUnityPlayerActivity";
  12. protected void onCreate(Bundle savedInstanceState) {
  13.  
  14. // call UnityPlayerActivity.onCreate()
  15. super.onCreate(savedInstanceState);
  16.  
  17. // print debug message to logcat
  18. Log.d(TAG, "!! FBUnityPlayerActivity:: onCreate called!");
  19. }
  20.  
  21. @Override
  22. public void onActivityResult(int requestCode, int resultCode, Intent data) {
  23. Log.d(TAG,"onActivityResult: requestCode: "+requestCode+", resultCode:"+resultCode+" intent data: "+data.toString());
  24. super.onActivityResult(requestCode, resultCode, data);
  25. Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);
  26. }
  27. }

Report this snippet  

You need to login to post a comment.