Android OpenFeint Issues

Hi,

Using most recent build and trying to implement OpenFeint for the Android version of Word Ball. Using Galaxy S - Epic 4G as a test device. Two issues…

1.) The OF dashboard does not seem to display a close button/icon even though I see the images loading. After it finishes loading, it is invisible. I have to use the physical device back button to navigate out of the dashboard.

2.) Upon returning to the app, the audio that was playing starts to skip and get choppy (possibly due to the fact that the webpopup was not properly disposed? - just a guess). Note that the audio was playing flawlessly before launching the dashboard.

Can someone please let me know if this is a known issue? And if it will be fixed in the next major release? If not, I might need to find a workaround/hack or disable OF altogether for the Android version.

Thanks in advance!

  • John [import]uid: 35190 topic_id: 12920 reply_id: 312920[/import]

we will look into it.

c. [import]uid: 24 topic_id: 12920 reply_id: 47526[/import]

Hello John,

Regarding issue #1, that is the correct behavior on Android. There is no close button. You are expected to press the physical Back button on the device to close OpenFeint.

We’ll look into the audio skipping issue that you mentioned. [import]uid: 32256 topic_id: 12920 reply_id: 47538[/import]

Thanks for the response! If you need additional info, please let me know.

Another question…Why does the audio stop when opening the OF dashboard? I’m assuming because of Android audio performance issues when playing in conjunction with network traffic due to the webpopup? Is stopping the audio when the dashboard opens by design as well because of this?

Thanks,

  • John [import]uid: 35190 topic_id: 12920 reply_id: 47541[/import]

Hello John,

The audio stops because the Corona activity is being suspended due to displaying another activity within the app. The OpenFeint dashboard is its own activity (notice how it slides in over Corona and is not a popup). The same will occur when calling media.playVideo() which slides in a video player activity. On iOS, we’ve added a configuration option to continue audio playback after Corona has been suspended. I don’t know if we have that same option on Android, but I’ll ask our audio experts.

In the meantime, can you tell me which Corona API you are using to play music? Are you using the “media” or “audio” API?

Thanks. [import]uid: 32256 topic_id: 12920 reply_id: 47548[/import]

On iOS the audio does not stop when opening the dashboard. That’s why I was asking…Since the behavior was different between the two.

And I am using the “audio” API…

Thanks,

  • John [import]uid: 35190 topic_id: 12920 reply_id: 47549[/import]

On Android the pressing the Menu button shows a “Exit Feint” button that will exit back to the Corona App. For iOS, there is an “x” in the upper right coroner of the OpenFeint screen that closes OF. [import]uid: 7559 topic_id: 12920 reply_id: 47555[/import]

thanks for letting me know…sorry…yea, I’m new to Android… :wink:

the audio is a separate issue though… [import]uid: 35190 topic_id: 12920 reply_id: 47558[/import]

btw…just tried using the “Exit Feint” button by pressing the device Menu option…The Audio is still choppy once you return back to the app… [import]uid: 35190 topic_id: 12920 reply_id: 47559[/import]

Wasn’t expecting this to be fixed yet…But just tried today’s build to see if there was any chance this was fixed…Still an issue…Is there any timeframe on fixing this anytime soon? I can wait if so…But if not, I am going to provide some type of workaround. I want to get the Android version out as soon as possible. Thanks! [import]uid: 35190 topic_id: 12920 reply_id: 48352[/import]

I assume you are talking about the choppy audio after exiting OpenFeint? Can you file a bug report with a small code sample that demonstrates the problem (and steps to reproduce)? That the best way to help us verify and resolve bugs.

The issue with audio stopping while in OpenFient on Android vs. iOS is probably how the OpenFeint library works in Android (which is a 3rd party library).

Thanks,
Tom [import]uid: 7559 topic_id: 12920 reply_id: 48364[/import]

Yes. I am talking about the choppy audio. I’ll see if I can whip up a quick code sample to demonstrate the issue and submit a bug report. In the meantime, I’ll just provide a workaround for Android so I can get it out there.

Thanks,

  • John [import]uid: 35190 topic_id: 12920 reply_id: 48366[/import]

Sorry, we don’t have a timeframe on this one. You are the first person to report this issue. Honestly, we still don’t understand what’s causing the problem.

To clarify, I expect we will continue to suspend the activity on Android…that’s an Android-ism and how things are designed on Android. Conversely, iOS will continue to do what it does.

If we were doing something completely wrong, I would expect audio to stop playing entirely. But instead, it is choppy which implies some kind of thread performance problem. But the thread performance characteristics shouldn’t be any different than before you started OpenFeint. And this only happens with OpenFeint to make things stranger?

Just to rule out something else, on return from OpenFeint, if you stop playing your sound, unload the sound (call dispose), reload it (presumably with loadStream), and start playing it again, do you still have choppiness?

Also do sounds you play loaded via loadSound play choppy? If so, it could be that either something from OpenFeint remains and is sucking up all the CPU, or possibly Android’s audio system gets completely messed up on activity switches. (The latter wouldn’t surprise me given all of Android’s audio problems, but working around OS bugs is hard.)

[import]uid: 7563 topic_id: 12920 reply_id: 48370[/import]

Actually, that is my proposed workaround since the audio works flawlessly when I do not launch the dashboard…So the workaround is that I can stop playing the audio when launching the dashboard. Then resume playing upon returning back to the app…I just tried it and the audio does not get choppy in this scenario (which is weird).

My only question is when to resume playing the audio. Are there callback events that I can catch upon immediate close of the dashboard? [import]uid: 35190 topic_id: 12920 reply_id: 48372[/import]

Wait. Let me get this clear. On Android:

  1. You play audio.
  2. You open OpenFeint
    (audio stops)
  3. You dismiss OpenFeint
    (audio resumes, but choppy)

Is this correct?

So if 4) you stop and play audio again, is it still choppy?
As for callbacks, do our normal application exit/suspend/resume callbacks work for you?
[import]uid: 7563 topic_id: 12920 reply_id: 48384[/import]

Yes. If you stop and play the audio again, it is not choppy. You have to reinitialize it for some reason. And yes, suspend/resume callbacks works for me to stop and resume the audio… [import]uid: 35190 topic_id: 12920 reply_id: 48396[/import]

I have noticed the choppiness on an iPhone 4 when OF is running.

The easiest way to get it to happen is to open the ad screen, bottom right button, as this loads some ad banners and fades them in. This stresses the system, the choppiness starts and it never recovers. [import]uid: 5354 topic_id: 12920 reply_id: 53112[/import]

@cigma did you find a way to resume the music once OF has closed? Can you share… [import]uid: 5354 topic_id: 12920 reply_id: 53113[/import]

I have got the same issue here. If I launch the dashboard, music is playing flawlessly. I am pretty sure, that banner loading is causing it. I am running game on iOS and using audio library. Here are some scenarios:

  1. I start the game and open dashboard. (I let the game enought time to initialize openfeint.)
  2. sound is playing fine
  3. on the dashboard, banner is loaded. It is also indicated by OS on the status bar - small loader on the upper left corner appears.
  4. Since this moment, music starts to be choppy
  5. Music is corrupted until I restart the application. (I didnt try to dismiss it and load it again.)
  6. same
  7. same
  8. before any banner loads, I quickly switch to leaderboards, where no banner is loading. Music is playing fine.
  9. Music is playing fine all the time, when I am working with screen with no banners.
  10. I switch to the featured games section.
  11. Once some banner starts to load, music starts to be choppy.
    Is there any chance to get it fixed soon?

OR

Is there any way (callback, event), how to catch the moment, when openfeint was closed to resume paused music?

Thank you. [import]uid: 52745 topic_id: 12920 reply_id: 66477[/import]

One of my colleague is working on another application. He is also experiencing problems with music. Music plays wrong in very similar way. But in his application, he does not use Openfeint or any other network action. Maybe this can be another bug, maybe there is a connection between this two bugs. [import]uid: 52745 topic_id: 12920 reply_id: 77303[/import]