0

I am currently working with Distriqt G+ ANE. My setup is this:

  1. AIR 16 with correct dx.jar provided in Distriqt tutorials.
  2. Using the Demoproject provided with District ANE
  3. Samsung Galaxy S-Plus (GT-I9001) with Android 2.3.6 for testing
  4. OAUTH IDs all set up correctly, it works perfectly on iOS
  5. GooglePlay and Core ANEs are included (even though former not necessary on iOS)

Problem #1: So i get the following very weird behavior with demo project (on Android):

  1. first call to signIn just does nothing.
  2. second call to signIn takes me to google plus application.
  3. i can select the account i want to use. but i can click on it and nothing happens. i can click 2-3 times usually.
  4. it switches back to the app, but triggers none of the event handlers

-> steps are repeatable and i never get any events back if you search for the app id in the cat log the only thing are the traces from the app and

08-19 18:18:32.031 I/GLSUser (4626): [GLSUser] getTokenFromGoogle [account: , callingPkg: air.my.com.zas.lefiner, service: oauth2:https://www.googleapis.com/auth/plus.login

Problem #2: If i try to implement this into my main app which uses several other ANEs.

<extensionID>com.distriqt.PushNotifications</extensionID>
<extensionID>com.itpointlab.ane.FlashLight</extensionID>
<extensionID>com.milkmangames.extensions.GoViral</extensionID>
<extensionID>com.distriqt.GooglePlus</extensionID>
<extensionID>com.distriqt.Core</extensionID>
<extensionID>com.distriqt.GooglePlayServices</extensionID>

I can't compile. With a very long error.

dx tool failed:warning: Ignoring InnerClasses attribute for an anonymous inner class (com.facebook.AppEventsLogger$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is not an inner class.

This block is repeated with dozens of other classes most of them in com.milkmangames.extensions.* some also having cryptic names like c.m.x.a.gv.al

At the end there is a memory error:

UNEXPECTED TOP-LEVEL ERROR: java.lang.OutOfMemoryError: Java heap space at com.android.dx.util.IntList.growIfNeeded(IntList.java:274) at com.android.dx.util.IntList.add(IntList.java:217)
...

Has anybody ever encountered similar problems with these 2 ANEs or just the G+ ANE on the old android phone?

Michael
  • 3,776
  • 1
  • 16
  • 27
Artifexx
  • 15
  • 1
  • 2
  • Your second issue is probably a conflict between the libraries that milkman have packaged and the version of GooglePlay Services. You can try removing GooglePlayServices however I believe the go viral ANE has an old version of this lib and probably won't work with distriqt ANE's. – Michael Aug 21 '15 at 23:44
  • ok this seems als to be the case with the Freshplanet Facebook ANE. Thats sad that there is no workaround for that and we now have to buy district ANE to have both platforms – Artifexx Aug 23 '15 at 12:08

1 Answers1

1

Your first issue sounds like a problem with the SHA-1 Certificate. You should make sure you are following the instructions to correctly generate this and that you have added this correctly to your console project.

http://airnativeextensions.com/extension/com.distriqt.GooglePlus#get-started

You can find more information on the certificate here: https://developers.google.com/+/mobile/android/getting-started

This is very important on Android and incorrectly matching this to the signature/certificate used to sign your application will cause the login to fail as you are experiencing.

Michael
  • 3,776
  • 1
  • 16
  • 27
  • Hi Michael, thank you for your reply. Do i need to use different OAUTH IDs depending on platform? What i did is: -> have one with type iOS (working) -> one with type android and the SHA1 Fingerprint of the certificate i am using to sign -> however i use just a self created certificate not the one used in flash builder. Is it possible for you to provide this certificate, because i don't have flash builder. Will try to test on other Android version as well now. – Artifexx Aug 22 '15 at 12:40
  • ok i noticed that the OAUTH client for android missed that "air." before the app id. which was the error... maybe add this to the tutorial as well! – Artifexx Aug 22 '15 at 13:04
  • If you aren't using FlashBuilder then the debug certificate included with it will be useless to you. FB uses that certificate to sign debug builds. – Michael Aug 23 '15 at 06:46
  • You definitely need different Oauth ids for each platform you use. The google console should guide you through this. You need to use your Android package ID which may include the air. prefix if you're not specifying its removal during packaging. – Michael Aug 23 '15 at 06:48