Combining LibGDX with IOIO Activity

13 views
Skip to first unread message

fawwaz muhammad

unread,
Feb 23, 2016, 12:34:41 AM2/23/16
to ioio-users
Dear Ytai

I am currently developing a game and i hope i can use IOIO OTG along with my game. My Game is developed using LibGdx. However i got a bit confussion when setting up the project. As you know, LibGdx Android application requires us to extend com.badlogic.gdx.backends.android.AndroidApplication class while IOIO Otg require us to extend ioio.lib.util.android.IOIOActivity class. I have several questions related to my case :
  1. I've copy and paste IOIO dependencies from HelloIOIO project's gradle to my LibGdx gradle and synced it. Although I can get ioio.lib.util.* package (core IOIO libraries-platform independent), I can't find ioio.lib.util.android.* package (IOIO application framework - platform dependent). I've repeat syncing it many times but the problem still occurs. How to solve it ?
  2. If someday I finally can get the ioio.lib.util.android.* package (IOIO application framework), how to combine both framework (LibGdx and IOIO) ? How to extend both classes ?
  3. If it is hard to combine both class or I still have a problem with the IOIO applicatoin framework packages, would you like to give me a litle complete example how to implement IOIOLibrary core class so it can get the same functionality as the IOIO application framework. I've read this section (https://github.com/ytai/ioio/wiki/IOIOLib-Core-API#appendix-explicit-creation-connection-and-disconnection) but i can't get a complete code / pseudo code how to implement it. FYI : LibGdx has it's own game loop function named "render()" and LibGdx has it's own "setup" function called "setup()"

Thanks ..



Ytai Ben-Tsvi

unread,
Feb 23, 2016, 11:26:54 PM2/23/16
to ioio-...@googlegroups.com
1. Most likely something's still wrong with your build.gradle file. Compare it carefully against HelloIOIO's build.gradle. Send it here if you aren't able to find the problem.

2.There's nothing magical about the IOIOActivity class. You can simply copy its contents into your application class instead of inheriting from it. This way, your class can inherit from something else.

3. Don't worry about it. Just collapse IOIOActivity into your class.

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+...@googlegroups.com.
To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

fawwaz muhammad

unread,
Feb 24, 2016, 1:34:49 AM2/24/16
to ioio-users


That is my project configuration
not found.png
notfound2.png

Ytai Ben-Tsvi

unread,
Feb 29, 2016, 12:20:23 AM2/29/16
to ioio-...@googlegroups.com
You're out of IOIO-land with this question, so my ability to help is somewhat limited (simply, because I don't know, no because I don't want to help...).
One thing that might be a problem is that fact that you have a pure-Java project depending on Android library projects, and it is possible that those dependencies don't work out well. Trying adding those dependencies to your Android project rather than your Java project.

fawwaz muhammad

unread,
Feb 29, 2016, 3:48:11 AM2/29/16
to ioio-users
Thanks for your help. Yes.. indeed,  i got a message saying that i have a pure-Java project. However, could you explain how to add thoose dependencies to my android project technically ? Like which menu should i click to check which library i used that a pure Java project ? Thanks for your help. Sorry for my bad english.

Ytai Ben-Tsvi

unread,
Feb 29, 2016, 2:54:26 PM2/29/16
to ioio-...@googlegroups.com
I don't work with the GUI configuration, but from the snippets you sent it seems like the IOIO dependencies are under the "core" project, which is a Java project. You can try moving them to the "android" project, which is an Android project (name is confusing).
If you want some IOIO-related logic in your "core" project, you can add a dependency on the IOIOLibCore project there, which is a pure Java project, and would include the entire IOIO API, excluding the application framework.
Reply all
Reply to author
Forward
0 new messages