0

I'm new to ANE-Facebook, however I've got positive experience with some other Freshplanet's ANEs.
The subject question is: Is my configuration wrong or is the issue caused by ANE's code?

This AIR app stops right after calling openSessionWithReadPermissions
For obvious reasons, the text bellow and attached log file have values replaced as follows:
MyNumericAppId - my app id ('0234XXXXXXXXX')
air.com.mydomain.myapp.debug - my app package (air.com.recxxxxx.xxxxx.debug)

  1. I've configured manifest and extension sections in application.xml according to freshplanet's readme and howto:

    <application> <id>com.mydomain.myapp</id> <!-- debug is being added automatically --> [...] <android> <manifestAdditions><![CDATA[ <manifest android:installLocation="auto"> [...] <uses-permission android:name="android.permission.INTERNET"/> <application> <activity android:name="com.facebook.LoginActivity"/> <activity android:name="com.freshplanet.ane.AirFacebook.LoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity> <activity android:name="com.freshplanet.ane.AirFacebook.ShareDialogActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity> <activity android:name="com.freshplanet.ane.AirFacebook.ShareOGActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity> <activity android:name="com.freshplanet.ane.AirFacebook.WebDialogActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity>
    </application> </manifest> ]]></manifestAdditions> </android> [...] <extensions> <extensionID>com.freshplanet.AirFacebook</extensionID> </extensions> </application>

  2. I've configured app facebook side (generated hashes based on certificate and password I've created earlier). facebook.config

  3. I call methods in order:

    trace("Facebook.isSupported", Facebook.isSupported); Facebook.getInstance().init(MyNumericAppId,false); Facebook.getInstance().logEnabled = true; trace("Facebook.getInstance().isSessionOpen" Facebook.getInstance().isSessionOpen); Facebook.getInstance().closeSessionAndClearTokenInformation(); Facebook.getInstance().openSessionWithReadPermissions(["public_profile", "user_friends"],aneSessionResult);

The Issue: Method aneSessionResult is never executed. Application stops immediately after calling openSessionWithReadPermissions and exits on confirmation. No ActionScript level error is being thrown. Delaying or triggering this method on user's input event - gives the very same result.

I'm attaching full info-level, not filtered log file, captured from start of the app till the crash occurrence (replaced app id and package).

Once again: Is my configuration wrong or is it something to do with ANE itself?
Thank you

P.S. either me or SO can't handle code formatting for this post. Apologies.

axldns
  • 55
  • 7

1 Answers1

0

Watched your log, there is a line

03-13 00:01:00.260: I/dalvikvm(6428): Could not find method android.support.v4.content.LocalBroadcastManager.getInstance, referenced from method com.facebook.AppEventsLogger.flushAndWait

That means class android.support.v4.content.LocalBroadcastManager is missing from ANE. I unzipped ANE from github and did not find either android-support-v4.jar or the class itself.

You can rebuild ANE on your own, you only need to add android-support-v4.jar to package dependencies in build/platform-android.xml.

Timothy Kovalev
  • 315
  • 1
  • 7
  • Thanks for your response. I need to set-up all the sdks and environmental things before I go with your solution. This may take a while. Cheers – axldns Mar 13 '15 at 15:14
  • Unfortunately this didn't help. I've successfully added android-support-v4.jar to the package (needed to edit build.xml too). This info is not thrown anymore but app gets terminated exactly the same way. Updated [log file here](https://drive.google.com/file/d/0B3Z-tgto3OaiMnFZcGVRSzZ6UHM/view?usp=sharing) Thanks – axldns Mar 14 '15 at 03:28