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

Author Topic: Integrate SFML into existing Android application  (Read 1305 times)

0 Members and 1 Guest are viewing this topic.

Suhair Zain

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Integrate SFML into existing Android application
« on: November 06, 2015, 07:40:17 pm »
Hi,
I tried the Android example app and it works fine. But I would like to integrate SFML into an existing Android app. i.e; I have implemented a part of the app using the Android SDK but for a specific functionality (rendering of a custom layout to be exact), I cannot go with Android SDK. Thus I decided to give SFML a try.

Is it possible that I can use SFML only for a specific portion of the app? Like, integrate it into an Activity which can be called from another Activity implemented using Android SDK(Java)? Have anyone successfully done something like that?

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 878
    • View Profile
Re: Integrate SFML into existing Android application
« Reply #1 on: November 07, 2015, 10:43:48 am »
As far as I know, not without modifications, since the SFML app brings its own native activity you'll have to run. Don't think you can just "embed" it into some layout or view. I might be completely wrong here though, so in case anyone else want's to jump in... :)

dabbertorres

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • website/blog
Re: Integrate SFML into existing Android application
« Reply #2 on: November 07, 2015, 05:48:11 pm »
This may be a little naive, but can you not just call the SFML Native Activity with an Intent?

Suhair Zain

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • Email
Re: Integrate SFML into existing Android application
« Reply #3 on: November 08, 2015, 01:49:35 pm »
@Mario
I'll take a look at it then. I was thinking of embedding it in a SurfaceView. I'll look for some workarounds and post here.

@dabbertorres
I wasn't clear enough in the question. To the best of my knowledge, we cannot use features of the Android SDK such as TitleBar etc in a NativeActivity. I may be completely wrong here, but I'll take a look at it and let you know.

Thanks all :)