freshplanet / ANE-Google-Play-Game-Services

Enable user to log in with Google+ to upload high score and achievements
Apache License 2.0
57 stars 42 forks source link

Show leaderboards? #4

Open brybam opened 10 years ago

brybam commented 10 years ago

Hey guys, thanks so much for making this ANE available. I just had a quick question. I see you have the functions to report a score... but how do I show the high scores?

overlawled commented 10 years ago

brybam,

I'm currently working on a fork that will do just this. I expect to commit either sometime tonight or early tomorrow morning.

pbarnwal commented 10 years ago

Ya even i need to show leaderboard. Please.

overlawled commented 10 years ago

It's committed here :)

https://github.com/overlawled/ANE-Google-Play-Game-Services

kubusabadi commented 10 years ago

I can't build my project with the new ane. There is exception: java.lang.OutOfMemoryError: Java heap space. I changed vmoptions to Xms1024m and Xmx1024m, but It didn't help.

Jolurawa commented 10 years ago

I am also having issues with your ANE overlawled. When i try to publish my app i get an error about dx tools... Also the sign out function in the original ANE doesn't seem to work for me... Does anyone else get this?

overlawled commented 10 years ago

kubusabadi, I'll need to see how you're building the project. What IDE are you using?

jordan739, Not sure what it's referring too in regards to dx tools. Same questions goes to you. What IDE? Did you use the ANE provided in my fork, or did your build it yourself?

Jolurawa commented 10 years ago

Well to put it bluntly, I am very new to app development. I have experience in AS3 but not really in java. I used the ANE provided in your fork and when i tried to publish my app i got an error that was something like java.lang.illegalargumentexception. I think it might be conflicting with another ANE that i'm using to display abmob ads. I've been using adobe flash professional CS6

overlawled commented 10 years ago

I believe I have read that that can indeed happen. I'm personally not using AdMob so I can't give you much advice there. What I would suggest is taking the AdMob related code out, as well as the ANE, and see what happens.

Jolurawa commented 10 years ago

Thanks for your suggestion, I tried removing the AdMob code and ANE. I now no longer get an error when using the ANE from your fork, but now when i try to sign in, my app crashes and stops.

overlawled commented 10 years ago

Crashes on the device? You can get debug logs by plugging the device in, opening eclipse, and opening the DDMS window.

kubusabadi commented 10 years ago

I build release version with mxmlc provided with air sdk. I added tag -Xmx1024m to jvm.config. I don't have AdMob. I build debug version with intelij 12 and there is no problem with java heap size.

Jolurawa commented 10 years ago

So tried some stuff, and using the original ANE i got everything working fine. I can log in and out and update highscores and stuff and have adverts from admob displaying all at the same time. This is great but i really need the show leaderboards function for my app. When i try to use your updated ANE overlawled i get the same error message as before. I'm certain it is because of a conflict between the ANES, but i dont really know what to do about it. I took a snapshot of the error: https://www.dropbox.com/s/m8hvg5jdu5f9zoz/error.PNG

can anyone help?

nicolechen819 commented 10 years ago

@overlawled Thanks so much for the ANE, now I can show leaderboard now. :D However is there any possible to show all leaderboards like showStandardAchievements()? Thanks.

Elegarret commented 10 years ago

@overlawled , tried to use your ane, and I have the same issue as the previous people had. Something about dx.. This crush appears when I try to package swf into apk using PackageApp.bat from flashdevelop mobile project. It is not compile-time error, it is adt-package-time:) With original @freshplanet's ane everything was ok.. while it haven't function for showing leaderboard:( Here is some log:

dx tool failed: UNEXPECTED TOP-LEVEL ERROR: java.lang.OutOfMemoryError: Java heap space at com.android.dx.cf.code.Ropper.(Ropper.java:296) at com.android.dx.cf.code.Ropper.convert(Ropper.java:251) at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:2 52) And there is more text, @Jolurawa posted the same full log in previous comment.

Did anybody solved this?

overlawled commented 10 years ago

@Elegarret try the v12 binary. It's built with the same version of the Google Play Services that freshplanets was.

Elegarret commented 10 years ago

@overlawled Now it fails with following: aapt tool failed:Warning: AndroidManifest.xml already defines versionCode (in ht tp://schemas.android.com/apk/res/android); using existing value in manifest. Warning: AndroidManifest.xml already defines versionName (in http://schemas.andr oid.com/apk/res/android); using existing value in manifest. Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.an droid.com/apk/res/android); using existing value in manifest. Warning: AndroidManifest.xml already defines targetSdkVersion (in http://schemas .android.com/apk/res/android); using existing value in manifest. C:\Users\Comp0\AppData\Local\Temp\33869f42-3f96-4654-905e-a5dbb2847d71\AndroidMa nifest.xml:61: error: Error: No resource found that matches the given name (at ' value' with value '@integer/google_play_services_version').

overlawled commented 10 years ago

@Elegarret Not sure about the warnings but the error is caused by a missing line in your manifest.

From the readme

<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
Elegarret commented 10 years ago

@overlawled It is more like that error on the contrary is caused by adding this line :) With this line packaging fails with the error I've noticed above. Without line it packages nice, but crushes when I try to call .signIn() without even showing login dialog as mentioned in #2 ... Oh.

Elegarret commented 10 years ago

@overlawled Finally it compiles and builds and packages too... And even sign in. But... When I try to call showLeaderboard there is an error occurs, that's what I see in debug output:

[Fault] exception, information=ReferenceError: Error #1069: Property showLeaderboard not found on com.freshplanet.ane.AirGooglePlayGames.AirGooglePlayGames and there is no default value.

Very strange.. If there is no this function, it shouldn't compile but it does. But fails in runtime.. Don't know where to dig.

overlawled commented 10 years ago

It sounds like you're using the original ANE.

Elegarret commented 10 years ago

@overlawled it is really sounds like that, but:

  1. in case of original ane it fails on compile-time and can not be built. But in my case it crashes compiled and packaged app
  2. it is definetely AirGooglePlayGamesService_v12.ane from your branch, not original ane:)
canaksoy commented 10 years ago

@integer/google_play_services_version gives error. I think writing the version manualy wrong way. I cant signIn. function onSignInSuccess(e:AirGooglePlayGamesEvent):void not triggering using: @overlawled

surajDico commented 10 years ago

@Elegarret did you find solution for the problem you were facing?. i am having same issue though am using the v12 ANE.

Please share if anyone has solution for the above problem.

Elegarret commented 10 years ago

@surajDico yep, i have removed this ane from project and bought milkman's version:)

surajDico commented 10 years ago

Ok. its working for me now. i used _froyo ANE and removed @integer/google_play_services_version from manifest. :))

chapira commented 10 years ago

its working like a charm.. BUT its conflicting with admob ane... anyone solve this?