Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Prime31 Android Plugins Officially Live!

Discussion in 'Android' started by prime31, Jun 6, 2011.

  1. groscalin

    groscalin

    Joined:
    Apr 4, 2011
    Posts:
    6
    Hi Prime,

    i just found that UrbanAirship removed from EtcAndroid, is it permanently removed?

    If not, When will it be available?

    Is it related with C2DM to GCM Push?
     
  2. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @groscalin, it was removed do to Google killing C2DM. We plan to add push support back once we can get a solution that is easy enough to setup for users.
     
  3. adada

    adada

    Joined:
    Feb 5, 2013
    Posts:
    3
    Hi Prime,

    For Google IAB plugin, is it possible to get the signatures of un-consumed purchases when calling GoogleIAB.queryInventory ?
    I just found queryInventorySucceededEvent will be fired with lists of GoogleSkuInfo and GooglePurchase. Is there anything i missed ?
    Thank you in advance !
     
  4. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @adada, the GooglePurchase class has a signature property right in it:
     
  5. DARK_ETERNAL

    DARK_ETERNAL

    Joined:
    May 9, 2012
    Posts:
    41
    Greetings Prime31.

    I'm using Android IAB plugin. An older version had a restoreTransactions() function, but it seems to be unavailable in the newest. I understand that non-consumable products are not to be passed to consumeProduct() function, but I don't quite understand how would I be able to restore a purchase if I reinstall my app. I know I can retrieve the items I own and I've not consumed. Should I process those retrieved and not consumed items as if I did a 1st-time purchase?

    Thanks in advance.
     
  6. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dark, read Googles documentation and understand their systems fundamental concepts before trying to use it. There is no such concept as restoring a transaction in Googles new billing system.
     
  7. DARK_ETERNAL

    DARK_ETERNAL

    Joined:
    May 9, 2012
    Posts:
    41
    @Prime31
    Did my research. Guess it's going to need some work to 'emulate' a purchase restoration.

    Thanks for your attention.
     
  8. serioustommy

    serioustommy

    Joined:
    Jun 12, 2012
    Posts:
    126
    Hi Prime,

    In the latest Android Facebook plugin, I can get it consistently to crash if I do:

    - logging using FacebookAndroid.loginWithPublishPermissions("publish_actions")
    - after the login web screen or facebook app comes up, cancel the screen
    - once back to the game, try doing the same login again
    - then I get:

    02-07 14:46:07.650: E/AndroidRuntime(13084): FATAL EXCEPTION: main
    02-07 14:46:07.650: E/AndroidRuntime(13084): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.supersolid.penguin/com.prime31.FacebookProxyActivity}: java.lang.UnsupportedOperationException: Session: an attempt was made to open an already opened session.
    02-07 14:46:07.650: E/AndroidRuntime(13084): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1967)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at android.app.ActivityThread.access$600(ActivityThread.java:127)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at android.os.Handler.dispatchMessage(Handler.java:99)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at android.os.Looper.loop(Looper.java:137)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at android.app.ActivityThread.main(ActivityThread.java:4511)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at java.lang.reflect.Method.invokeNative(Native Method)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at java.lang.reflect.Method.invoke(Method.java:511)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at dalvik.system.NativeStart.main(Native Method)
    02-07 14:46:07.650: E/AndroidRuntime(13084): Caused by: java.lang.UnsupportedOperationException: Session: an attempt was made to open an already opened session.
    02-07 14:46:07.650: E/AndroidRuntime(13084): at com.facebook.Session.open(Session.java:947)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at com.facebook.Session.openForPublish(Session.java:415)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at com.prime31.FacebookProxyActivity.openSession(FacebookProxyActivity.java:72)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at com.prime31.FacebookProxyActivity.onCreate(FacebookProxyActivity.java:41)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at android.app.Activity.performCreate(Activity.java:4470)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052)
    02-07 14:46:07.650: E/AndroidRuntime(13084): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1931)
    02-07 14:46:07.650: E/AndroidRuntime(13084): ... 11 more

    It works fine otherwise if I login with the correct user name and password the first time.
     
  9. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @serious, that is exactly the expected behavior according to Facebooks docs. You cant just open multiple sessions without closing the previously opened session. Calling the logout method will automatically close the opened session for you.
     
  10. serioustommy

    serioustommy

    Joined:
    Jun 12, 2012
    Posts:
    126
    Even without actually logging in? On the login screen that comes up cancel is pressed so the game resumes. In this case shouldn't session be cancelled automatically since the player didn't actually log in? Is the best practice to always call logout() inside the loginFailedEvent? Just doesn't seem right that the session is left open even if login is cancelled or failed.
     
  11. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @serious, a session has to be opened just to start the login process. Facebook will not close session for you. That is up to you to do. I would suggest you read through Facebook's docs to gain an understanding of how their authentication system works.
     
  12. serioustommy

    serioustommy

    Joined:
    Jun 12, 2012
    Posts:
    126
    OK that's fine. Is there a way to detect that a session is opened before we call login again? FacebookAndroid.IsSessionValid() seems to only returns true when a login is successful right? Is it going to be safe just to call logout() before calling login() every time?

    Another concern is that iOS plugin doesn't suffer from this though so a suggestion would be to close the session automatically in the plugin whenever a login is cancelled or failed. Just so developers don't have to handle them differently even though the API is the same.
     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @serious, a session will be opened only if you open it. You are in complete control over session management.
     
  14. serioustommy

    serioustommy

    Joined:
    Jun 12, 2012
    Posts:
    126
    ok sure sorry to keep dwelling on this and this is my last attempt to get my point across :)

    If whenever a login attempt fails or is cancelled, is there any point in having the session opened? If the only course of action is to close it my question is why not just close it at the API/plugin level? This is in line with how iOS plugin works (if a login attempt is cancelled or fails, you can call login again without crashing). So having them work the same way can only be beneficial is my take on it. Plus you won't get people like me wasting your time reporting it as a "bug" :)
     
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @serious, if we start overriding the default behavior of the actual Facebook SDK then their documentation is no longer valid. If we leave it as is then you can still use the Facebook documentation and it will all still be perfectly valid.
     
  16. jreitman

    jreitman

    Joined:
    Jul 24, 2012
    Posts:
    10
    EtceteraAndroid does not support playMovie() with files in the StreamingAssets folder an expansion obb.

    I have tried multiple different paths including fully pathing the file.

    works fine with non-split binary:
    EtceteraAndroid.playMovie( "Filename.mp4", 0xFFFFFFFF, false, EtceteraAndroid.ScalingMode.Fill, true );

    none of the below work at all with split binary:
    EtceteraAndroid.playMovie( "Filename.mp4, 0xFFFFFFFF, false, EtceteraAndroid.ScalingMode.Fill, true );
    EtceteraAndroid.playMovie( "assets/" + "Filename.mp4, 0xFFFFFFFF, false, EtceteraAndroid.ScalingMode.Fill, true );
    EtceteraAndroid.playMovie( Application.streamingAssetsPath + "/" + "Filename.mp4, 0xFFFFFFFF, false, EtceteraAndroid.ScalingMode.AspectFit, true );

    Would love to get this sorted out soon. We are trying to ship early next week and the prime video player (unlike Unity's) actually supports Fill
     
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @jreitman, without Unitys source code we can't say how to properly path a video when splitting your APK. What should always work is using a remote URL for the video though.
     
  18. jreitman

    jreitman

    Joined:
    Jul 24, 2012
    Posts:
    10
    Sure, but remote sucks as you have to have internet.

    So it sounds like there is no plans to make the function work correctly? bummer :(
     
  19. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,740
    Hi there
    I'm having this odd situation that only happens with Prime31 Admob android plugin. The issue is that when I pause the app (I hit the home button), the cpu usage is about 10 to 20% high constantly, killing the battery of the phone.
    I tested it on multiple phones and it always happen. I searched over the internet and it seems a common problem but I found no solution.

    Removing the admob plugin fixes it, no more cpu usage once it's out of the plugins folder.

    Any ideas? Do we need to call something besides destroyBanner() ?
     
  20. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @creat, just destroy the banner before you exit.
     
  21. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,740
    that's what i do but still happen...
     
  22. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @creat, contact AdMob then. We have no access to their SDK to look into it. You will also want to profile further and ensure that it is AdMobs code using the CPU.
     
  23. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,740
    it is. Also confirmed by unity beta itself.
    But the problem is solvable on the java code. It seems you don't only need to destroy it but also set it to null. There is a whole bunch of posts about it on the internet.
     
  24. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @creat, our code always nulls out all views after removing them from the hierarchy. That is totally standard Java practices.
     
  25. soulburner

    soulburner

    Joined:
    Mar 25, 2012
    Posts:
    167
    Hello, prime31.

    I've purchased your plugin for Google Play In App Billing and I'm trying to perform server-side security check.

    So, I've subscribed to purchaseCompleteAwaitingVerificationEvent and sending received data and singature to my server for the security check.

    But server-side signature verification fails.

    I've googled a lot and noticed that purchase data I've got from your plugin looks like (line breaks are added just for clearance):
    Code (csharp):
    1. {"orderId":"12999763169054705758.1343126841037941","packageName":"com.xxxxxxx",
    2. "productId":"cristal_pack_1_20","purchaseTime":1360177322000,"purchaseState":0,
    3. "developerPayload":"XXXXXXXXXX",
    4. "purchaseToken":"kenxwuokhkontlhoeankoozx.AO-J1Owuh17YjVg1UAsxezeZrT0VPz6vVUzFmGZNXqIPWM_adOuNQU2ZGmAx1VwJIgF3ZbDJNqiKZct3APZMXCLwXsS-WQTGGGXz307e2dpEtEX9xNOk7aqPzHt5S54ZdTnbgxr3UsRM"}
    but in some examples I've found the data looks totally different:

    Code (csharp):
    1.  
    2. {"nonce":-9092176369901149507,"orders":[{"notificationId":"android.test.purchased",
    3. "orderId":"transactionId.android.test.purchased","packageName":"com.blundell.test",
    4. "productId":"android.test.purchased","purchaseTime":1346661666055,"purchaseState":0}]}
    5.  
    Is the data received by purchaseCompleteAwaitingVerificationEvent listener is a raw data sent by Google? Or it has been already re-combined.

    Can you please help me with implementing security check? (our company purchased a bunch of plugins from you - iOS in-app, fb/twitter, etc.)
     
  26. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @soul, the plugin returns the purchase data payload exactly as Google sends it. Setting up server side receipt validation is up to you and outside the scope of the plugin. The best we can do is point you to a working example but please note that we do not support server side PHP code as in this example. You are on your own. https://gist.github.com/prime31/4750744
     
  27. soulburner

    soulburner

    Joined:
    Mar 25, 2012
    Posts:
    167
    Thanks a lot!
     
    Last edited: Feb 14, 2013
  28. games-james

    games-james

    Joined:
    Jan 17, 2013
    Posts:
    7
    Hello .... I am using Prime31 Plugin for Android InApp billing The problem I am facing is that on No Internet Connection the function " GoogleIAB.queryInventory(productIdentifiers);" is returning me "queryInventorySucceededEvent" where as on iOS it is returning productListRequestFailed

    What should be the answer on NO connectivity on android


    Thanks in Advance
     
  29. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @games, iOS does not have Google in app billing. The result you get is exactly as it is returned from Google
     
  30. kanpot2002

    kanpot2002

    Joined:
    May 10, 2012
    Posts:
    8
    Hello I'm using Android Social Network for Facebook

    I'm having a problem after redirect to facebook app and then about to return to my app
    There's a pop up says "Unfortunately, [App Name] has stopped"

    Here's the logcat

    02-16 00:31:11.891: I/Prime31(9080): session state: CREATED
    02-16 00:31:12.852: I/Prime31(9080): session state: CREATED
    02-16 00:31:13.843: I/Prime31(9080): session state: CREATED
    02-16 00:31:14.854: I/Prime31(9080): session state: CREATED
    02-16 00:31:15.855: I/Prime31(9080): session state: CREATED
    02-16 00:31:16.876: I/Prime31(9080): session state: CREATED
    02-16 00:31:18.017: I/Prime31(9080): session is null so it has not yet been started
    02-16 00:31:18.208: I/Prime31(9080): launching proxy Activity to intercept SSO login
    02-16 00:31:18.278: I/Prime31(9080): FacebookPlugin: openActiveSession.call with state: OPENING, exception: null
    02-16 00:31:36.766: I/Prime31(9637): launching proxy Activity to intercept SSO login
    02-16 00:31:36.796: E/Prime31(9637): Something has gone terribly wrong. The Unity Activity does not exist. This could be due to a low memory situation

    Can it really be about memory?

    Thanks
    Karnpot
     
  31. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @kanpot, you are running out of memory and the Unity Activity is getting jettisoned. Reduce your memory usage.
     
  32. danilomiranda

    danilomiranda

    Joined:
    Jun 4, 2012
    Posts:
    12
    I am using Social Networking Plugin.

    When I call the function Facebook.instance.graphRequest( "me", HTTPVerb.GET, ( error, obj )) it returns the following error: java.io.FileNotFoundException: https://graph.facebook.com/me

    This occurs right after I login.
     
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dan, the WWW class will throw a FileNotFoundException whenever a 4xx response is made. That almost always means your request is incorrect due to not being properly logged in.
     
  34. danilomiranda

    danilomiranda

    Joined:
    Jun 4, 2012
    Posts:
    12
  35. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dan, you do not have a properly logged in user. There is no access token. Review the demo scene to learn how to log a user in.
     
  36. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,740
    i'm using admob android plugin. I keep getting these messages from time to time. I tried to try/catch them but it seems to be on the plugin level, any ideas what's causing it? My guess is that the ad is not loaded yet, but I need to destroy it if the user switches to a different screen or it will popup out of the blue.


    D/webviewglue( 8542): nativeDestroy view: 0xa722b8
    E/Ads ( 8542): An error occurred while destroying an AdWebView:
    E/Ads ( 8542): java.lang.NullPointerException
    E/Ads ( 8542): at android.webkit.WebView.setWebViewClient(WebView.java:5168)
    E/Ads ( 8542): at com.google.ads.internal.AdWebView.destroy(SourceFile:252)
    E/Ads ( 8542): at com.google.ads.internal.c$e.run(SourceFile:191)
    E/Ads ( 8542): at android.os.Handler.handleCallback(Handler.java:605)
    E/Ads ( 8542): at android.os.Handler.dispatchMessage(Handler.java:92)
    E/Ads ( 8542): at android.os.Looper.loop(Looper.java:137)
    E/Ads ( 8542): at android.app.ActivityThread.main(ActivityThread.java:4511)
    E/Ads ( 8542): at java.lang.reflect.Method.invokeNative(Native Method)
    E/Ads ( 8542): at java.lang.reflect.Method.invoke(Method.java:511)
    E/Ads ( 8542): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
    E/Ads ( 8542): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
    E/Ads ( 8542): at dalvik.system.NativeStart.main(Native Method)
     
  37. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @creat, you need to report that to AdMob. That is coming from their closed source SDK.
     
  38. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,740
  39. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,740
    @mike i just replaced the included admob.jar file with the one on google's site and it fixed the issue. 6.3 seems to be ok, which one is included on the plugin?
     
  40. renderhjs

    renderhjs

    Joined:
    Aug 16, 2011
    Posts:
    90
    @Prime[31]: Would it be possible for you to show an example how your
    works successfully?

    What I have at the moment:
    Code (csharp):
    1. List<System.Object> permissions = FacebookAccess.getSessionPermissions();
    2. foreach(System.Object o in permissions){
    3.     Debug.Log("Permission: "+o.ToString());
    4. }
    5.  
    6. Facebook.instance.getAppAccessToken( Const.FACEBOOK_APP_ID, Const.FACEBOOK_APP_SECRET, (string response) => {
    7.     Debug.Log("getAppAccessToken: "+response);
    8.  
    9.     Facebook.instance.graphRequest("me",Prime31.HTTPVerb.GET, (string error, object obj) => {
    10.         if( error != null || obj == null ){
    11.             return;
    12.         }
    13.         string fbId = ((Hashtable)obj)["id"].ToString();
    14.         UiLog.Log("facebook id: "+fbId);
    15.        
    16.         Facebook.instance.postScore(fbId, score, OnScoreSubmitted);
    17.     });
    18. });
    But it always returns false, and doesn't seem to do anything on facebook. You sample scene doesn't contain an example on how to use this feature of your plugin, I tried already searching on Google but I can't find a working example:

    The only 2 google results are still unanswered, some additional explanation would be very helpful.
     
  41. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @render, it will return false unless you properly setup your Facebook app and request the proper permissions. Refer to Facebooks documentation for the requirements.
     
  42. renderhjs

    renderhjs

    Joined:
    Aug 16, 2011
    Posts:
    90
    In my example it logs the needed permissions using FacebookAccess.getSessionPermissions() and it lists "publish_actions" as one of them. Also the Facebook app is setup and works with other methods, secret key and app id are all correct as they work with other methods of your plugin just fine.

    Also your documentation doesn't explain at all what "getAppAccessToken()" does in context of the submitScore methods. Some proper documentation or example is all I ask for.

    So would you mind just posting a simple example that works?, that exaplains how the chain of events, what id's etc. works because I and other people apparently can't figure it out!
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @render, getAppAccessToken is nothing more than a WWW call that you can do yourself. You are certainly free to open the Facebook.cs file and read the code. There is no magic happening. All it is doing is a WWW call according to Facebooks documentation which you absolutely have to read if you intend to use their endpoints. There is no point in us duplicating all of their documentation. That makes no sense. There is a fully functioning example included with the plugin in the demo scene for posting a score. It requires a properly configured Facebook app with all requirements from their documentation for app setup satisfied. All it takes to post a score:

    - log user in
    - get the app access token
    - get the userId
    - post the score
     
    Last edited: Feb 18, 2013
  44. renderhjs

    renderhjs

    Joined:
    Aug 16, 2011
    Posts:
    90
  45. renderhjs

    renderhjs

    Joined:
    Aug 16, 2011
    Posts:
    90
    I fixed it. For anyone interested, the game needs to be under the category of "Games" in the advanced hidden settings

    Now it returns true when submitting a score
     
  46. danilomiranda

    danilomiranda

    Joined:
    Jun 4, 2012
    Posts:
    12
    When I call the function FacebookAndroid.init (), it returns the following error: Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider.

    In the facebook page is now all set: Package Name, Class Name and Key Hashes.

    Also manifest in:
    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="\ 00000000000"/>
    <activity android:name="com.prime31.FacebookProxyActivity"/>
    <activity android:name="com.facebook.LoginActivity"/>
    <uses-permission android:name="android.permission.INTERNET"/>
     
    Last edited: Feb 18, 2013
  47. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @danil, you will need to report that to Facebook. We have no access to their source.
     
  48. emmall

    emmall

    Joined:
    Dec 23, 2012
    Posts:
    4
    Hi!

    I already have implemented the iOS Prime31 plugin and everything is working like a charm.
    But I'm having problems with the Android version. I am receiving this message:

    02-18 19:23:19.564: W/dalvikvm(6599): threadid=1: thread exiting with uncaught exception (group=0x2aac8578)
    02-18 19:23:19.574: E/AndroidRuntime(6599): FATAL EXCEPTION: main
    02-18 19:23:19.574: E/AndroidRuntime(6599): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.app/com.prime31.FacebookProxyActivity}: java.lang.UnsupportedOperationException: Session: an attempt was made to request new permissions for a session that has a pending request.
    02-18 19:23:19.574: E/AndroidRuntime(6599): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1659)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at android.app.ActivityThread.access$1500(ActivityThread.java:121)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at android.os.Handler.dispatchMessage(Handler.java:99)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at android.os.Looper.loop(Looper.java:130)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at android.app.ActivityThread.main(ActivityThread.java:3701)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at java.lang.reflect.Method.invokeNative(Native Method)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at java.lang.reflect.Method.invoke(Method.java:507)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at dalvik.system.NativeStart.main(Native Method)
    02-18 19:23:19.574: E/AndroidRuntime(6599): Caused by: java.lang.UnsupportedOperationException: Session: an attempt was made to request new permissions for a session that has a pending request.
    02-18 19:23:19.574: E/AndroidRuntime(6599): at com.facebook.Session.requestNewPermissions(Session.java:968)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at com.facebook.Session.requestNewPublishPermissions(Session.java:501)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at com.prime31.FacebookProxyActivity.reauthorizeWithNewPublishPermissions(FacebookProxyActivity.java:100)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at com.prime31.FacebookProxyActivity.onCreate(FacebookProxyActivity.java:35)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    02-18 19:23:19.574: E/AndroidRuntime(6599): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623)
    02-18 19:23:19.574: E/AndroidRuntime(6599): ... 11 more

    What sould I do? I've been all day (+9 hours) struggling with this and I'm starting to think that it's impossible to achieve!

    Thanks!
    Emma
     
    Last edited: Feb 18, 2013
  49. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @emmall, you are opening 2 sessions. That is absolutely invalid according to Facebooks SDK docs. Close the first session by calling logout before opening another.
     
    Last edited: Feb 18, 2013
  50. emmall

    emmall

    Joined:
    Dec 23, 2012
    Posts:
    4
    Does someone here have a tutorial on how to integrate prime31 social networking plugin into Unity? I've wasted 2 days of my time (and this is really expensive), besides having spent 65$ on the plugin. I haven't received any tutorials about how to integrate this plugin....... This is really desperating for being the most expensive plugin to integrate social networks into a Unity project.

    Now a window facebook gets opened. First I receive the message "Loading", then there's the facebook top bar and a blank page and then the App returns to the game. No errors found on the logcat, I only get this:

    02-19 17:35:42.730: I/Prime31(13089): FacebookPlugin: openActiveSession.call with state: OPENING, exception: null
    02-19 17:35:42.740: I/ActivityManager(238): Starting: Intent { cmp=com.facebook.katana/.ProxyAuth (has extras) } from pid 13089
    02-19 17:35:43.010: D/dalvikvm(13176): GC_CONCURRENT freed 541K, 39% free 6996K/11463K, external 2902K/3618K, paused 3ms+6ms
    02-19 17:35:43.310: I/ActivityManager(238): Displayed com.facebook.katana/.ProxyAuth: +557ms (total +837ms)
    02-19 17:35:44.140: I/Prime31-Proxy(13089): proxy onActivityResult intercepted. resultCode: -1


    And in Twitter I have a weird problem. On my code I really "init" twitter, but I receive this message on the logcat:

    02-19 18:02:25.527: I/Prime31(14129): initializing Twitter service
    02-19 18:02:25.677: I/Prime31(14129): initialized Twitter service. got requestToken
    02-19 18:02:25.677: I/Prime31(14129): service is null. We can't do anything until init is called

    I really need your help or a little tutorial on how to implemen this. I've already implemented iOS version so I'm not a newbie, it's just that there's no documentation at all from your part.