Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Android and iOS ports available for testing  (Read 337923 times)

0 Members and 10 Guests are viewing this topic.

ncsu121978

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Android and iOS ports available for testing
« Reply #105 on: March 14, 2014, 07:37:17 am »
on Android, how to detect if the player presses the back button or the menu button?  the Home button is really handled by the OS itself and suspends your app, but in other games the back button can be used for menu navigation among other things.  I cant find the way to detect that event.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #106 on: March 14, 2014, 10:10:03 am »
As far as I know buttons (hardware and virtual) aren't implemented yet and get just dropped. E.g. you can't use volume control while an SFML app is active.

myl

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • Email
Re: Android and iOS ports available for testing
« Reply #107 on: March 14, 2014, 02:44:24 pm »
Hi,

Am I the only one getting an error message telling that 'EGL/egl.h file not found', when building for iOS?

I've looked through the whole post, and it doesn't seem that anyone else have the same problem.

I'm running OSX 10.9 Mavericks, iOS 7 on x64 simulator.

/Kenneth

I have the same issue (and the same system configuration).

I also have this issue on the same system configuration.

leafdj

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Android and iOS ports available for testing
« Reply #108 on: March 23, 2014, 03:10:04 am »
Hi all! I'm running into the issue where the app crashes right off the bat without any errors. Both on a Nexus 4 emulator and on a Nexus S device. I believe it has to do with not launching the native activity.

I'm using the r9d release of the ndk, with the latest version of the ios_and_android branch, but I still tried building it with and without -DANDROID_USE_STLPORT=TRUE after I couldn't get it working the first time.
I believe it has to do with not launching the proper activity at the beginning, because I didn't see any similar errors with the ndk native activity example.

Is there a way for me to diagnose if it's something wrong with my SFML build or with my project settings?

--Additional Information--
Using Android Studio on Windows 8 64bit
I built SFML with 'cmake -G "MinGW Makefiles" -DANDROID_NDK=C:/android-ndk-r9d -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/android.toolchain.cmake'
'make install'

I'm using Android Studio, but have the project set up the same way as the native activity example, so I don't believe that is the problem.

I also included my Android Manifest file, thinking it might simply be a problem in there. It's slightly modified from the sfml example. The important part to note is that android.app.lib.name corresponds to libsfml-activity.so, and sfml.app.lib_name corresponds to libapp.so, which are both in libs/armeabi/.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #109 on: March 23, 2014, 07:29:59 am »
Try disabling all parts of the code related to the Audio module. As far as I know it seems to be some incompatibility with the precompiled OpenAL library.

leafdj

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Android and iOS ports available for testing
« Reply #110 on: March 24, 2014, 02:12:44 am »
Thank you! Looks like that was it, in addition, I'm now seeing relevant messages in my logcat console as well, so it should be easier to debug problems now.
I had actually tried removing them all before, but sfml-activity would error out if I didn't include the audio and network shared libraries in the apk.

Just in case it's helpful, this is the logcat error when attempting to play the audio in the example app:
03-23 18:07:25.097    8680-8697/com.leafdj.app A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 8697 (.leafdj.app)

myl

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • Email
Re: Android and iOS ports available for testing
« Reply #111 on: April 07, 2014, 11:40:28 am »
Hi,

Am I the only one getting an error message telling that 'EGL/egl.h file not found', when building for iOS?

I've looked through the whole post, and it doesn't seem that anyone else have the same problem.

I'm running OSX 10.9 Mavericks, iOS 7 on x64 simulator.

/Kenneth

I have the same issue (and the same system configuration).

I also have this issue on the same system configuration.

It seems building for iOS is broken at this point. But I successfully build https://github.com/SFML/SFML/tree/7ba4458bea396434eb29b0e1cc19fe0104747d1c

myl

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Android and iOS ports available for testing
« Reply #112 on: April 07, 2014, 12:29:23 pm »
I've identified the problem, it should be fixed soon.

Thanks for the feedback.
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Android and iOS ports available for testing
« Reply #113 on: April 07, 2014, 11:31:10 pm »
Quote
I've identified the problem, it should be fixed soon.
Done. The EGL stuff should no longer cause errors on iOS.

I've also reviewed the sensor API, it's not tested yet on iOS and has to be rewritten on Android (should be done quickly).
Laurent Gomila - SFML developer

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Android and iOS ports available for testing
« Reply #114 on: April 07, 2014, 11:47:00 pm »
Regarding the iOS audio issue, since there's no sign of a licensing breakthrough from libsndfile, how hard would it be to reimplement that part of the module using some other library, like the AVAudioPlayer class that the iOS SDK comes with?  (I don't care about the exact range of file formats we get, as long as it's better than just .wav)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Android and iOS ports available for testing
« Reply #115 on: April 08, 2014, 08:02:37 am »
It would require a major internal redesign.
Laurent Gomila - SFML developer

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #116 on: April 11, 2014, 03:50:30 pm »
Should the Android example to work now? I built it with armeabi-v7a and it crashes on start.

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #117 on: April 11, 2014, 04:03:06 pm »
Try commenting out all SFML Audio related lines and it should run just fine. It's the precompiled library that somehow screws up.

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Android and iOS ports available for testing
« Reply #118 on: April 11, 2014, 04:08:37 pm »
Yes, thank you, it works now. Cool! =)
So i need to build audio libs myself?

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Android and iOS ports available for testing
« Reply #119 on: April 11, 2014, 04:13:12 pm »
It might help, haven't tried it so far, since compiling OpenAL for Android doesn't seem to be too trivial to do. :(

 

anything