Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running this ANE #249

Open
tufik2 opened this issue Apr 29, 2017 · 8 comments
Open

Problem running this ANE #249

tufik2 opened this issue Apr 29, 2017 · 8 comments

Comments

@tufik2
Copy link

tufik2 commented Apr 29, 2017

I am texting this ANE, but don't run in AIR 24/25 - Android

if (Facebook.isSupported) Facebook.instance.init("276277716117762", _initCallback);

_initCallback never execute.....

Do I need to load additional ANES? or extra libraries?? Thank you...

I only load AirFacebook.ane extension, 8MG

<extensions>
  <extensionID>com.freshplanet.ane.AirFacebook</extensionID>
</extensions>

And have that configuration....

<![CDATA[<manifest>
		<uses-permission android:name="android.permission.INTERNET" />
		<application>
			<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="fb0000"/>
			<activity android:name="com.facebook.FacebookActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:label="MyAppName" />
			<activity android:name="com.freshplanet.ane.AirFacebook.LoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" />
			<provider android:authorities="com.facebook.app.FacebookContentProvider0000" android:name="com.facebook.FacebookContentProvider" android:exported="true"/>
		</application>
</manifest>]]>
@RomanBurnIT
Copy link

RomanBurnIT commented May 15, 2017

Hi,
same problem here...

  • the script can not access the id specified in meta-data tag of app XML, no matter what I do, so it always falls to "Facebook sdk initialized with applicationId: ".... with the app id specified in call of init method
  • the FacebookSdk.sdkInitialize never reaches to the callback which should be called on init

my AS3 code (building in Flash CC, AIR 25.0.0.134 for Android):

fbtest.txt

my app XML:
fbtest-app.txt

and output in debugger:
[SWF] fbtest.swf - 4267 bytes after decompression
Facebook.isSupported: true
FB INIT START
[AirFacebook][AS3] ANE Facebook version: 4.19.0
[AirFacebook][NATIVE] FB application ID from AndroidManifest.xml: no metadata
[AirFacebook][NATIVE] Initializing with custom applicationId: 1234567890123456
`

....FB id is replaced, but in code I use the valid one....
I will be glad to contribute some $ for consulting/help ;)

@CaptainHug
Copy link

Same problem here.

AIRSDK 25.0.0.134

Seeing exact same results as @RomanBurnIT above. It does seem to be related to the fact that the metaData object is null. Not sure if it's an issue with the ANE or AIRSDK, as I've pulled out the meta data with apktool and everything looks to be in order.

I tried re-compiling and debugging the android code, the callback for sdkInitialize is never called, and you get a bunch of errors in the logs as follows:

AirFacebook: [NATIVE] FB application ID from AndroidManifest.xml: no metadata
art : Rejecting re-init on previously-failed class java.lang.Class<com.facebook.FacebookActivity>

Yet there is no actual error for the original cause of the issue.

@CaptainHug
Copy link

Same results with AIR 24 and 25, also tried building against FacebookSdk 4.18 and 4.19

@CaptainHug
Copy link

Anyone found a workaround / solution to this yet? @tufik2 @RomanBurnIT

@xiexueyong
Copy link

A FacebookActivity instance will be created when Facebook sdk init.but at this time a Exception happen .the program will be interrupted.In ANE, no exception will be throw out ,and the ActionScript fill no thing ,so you can not fount what happen in ANE.Usually the exception is beacause loss dependency jar file,such as support.****.jar. unzip the AirFacebook.ane.you will find that in the extension.xml most jar dependency jar files are remove.I do not know why.
solution: remove all dependency jar in airFacebook.ane ,rebuild it agin, then add this supportAne.ane in the project .it will be ok:https://github.com/myflashlab/common-dependencies-ANE/tree/master/androidSupport.
maybe it will work.
I use another way:I develop a Facebook without and dependency jar, then add the support.ane ,the it is ok.

@CaptainHug
Copy link

CaptainHug commented May 31, 2017

Have updated the Android SDK to 4.23.0 and re-added the platform dependencies in this branch:

https://github.com/CaptainHug/ANE-Facebook

Includes an updated binary.

Fixed the issue for me.

@tufik2 @RomanBurnIT

@giaoban
Copy link

giaoban commented Jun 29, 2017

Hi @CaptainHug
When i use your ane on ios device, it is crash when I logInWithReadPermissions :(
i using air sdk 26.0, please check it for me
Thanks!

@RomanBurnIT
Copy link

hello, just to give some feedback....I gave up with this one and I purchased the one from myflashlabs....works well and I guess the price is worth of spared time...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants