Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pack godot game(s) into a native android/ios app and start it? #12016

Closed
CloudTsang opened this issue Oct 11, 2017 · 9 comments
Closed
Labels

Comments

@CloudTsang
Copy link

CloudTsang commented Oct 11, 2017

I need to add a game to my app(used for some math learning) to make it funnier for kids so I start to learn godot.
But firstly I must figure out how to export a godot game as not a single app but a part of my app like a plugin and can be started by pressing a button in my native android/ios app.
Since the exported-pck file contents all data of a godot game , and I see the export template of IOS and Html seems to be some file to call the pck file(?) , is it possible to do this with our own java/objc code?

Sorry for my poor English and hope for your responses!

@CloudTsang
Copy link
Author

No response after a week.T_T
Was my issue not clear enough or being wrong somewhere?

@vnen
Copy link
Member

vnen commented Nov 19, 2017

AFAIK nobody ever tried this. If no one answered is likely that no one knows. Godot wasn't made to be embedded in other apps, so while it may be possible, you won't get much help here unless it's a more specific issue.

@CloudTsang
Copy link
Author

I'm trying to use "Custom Packge" to set my own packaged apk as export template.

So far, it is successful to export a apk but fail to start the Godot activity and throw an exception of invalid reference in call to “GetLongField”(called from GodotLib.initiaize()?). Maybe somthing wrong in manifest or build.gradle configuration .

@CloudTsang
Copy link
Author

emmm...
This way(Custom Packge) works.
I can boot godot game from my app ....................... only once.
I change the code in Godot.java and GodotView.java about back button so that when I press back button in godot game , it will just finish the activity not quit the whole app.

But it seems not enough to quit the godot part safely just simply adding some "this.finish()".
When i next boot godo game from my app , it throws these err:

E/godot (16992): ERROR: Condition ' configured ' is true.
E/godot (16992): At: core\string_db.cpp:55:setup() - Condition ' configured ' is true.
E/godot (16992): ERROR: Condition ' singleton ' is true. returned: __null
E/godot (16992): At: core\io\ip.cpp:270:create() - Condition ' singleton ' is true. returned: __null
E/godot (16992): ERROR: Condition ' singleton ' is true.
E/godot (16992): At: core\input_map.cpp:289:InputMap() - Condition ' singleton ' is true.
E/godot (16992): ERROR: Condition ' singleton != __null ' is true.
E/godot (16992): At: core\message_queue.cpp:339:MessageQueue() - Condition ' singleton != __null ' is true.
I/godot (16992): *****SETUP OK
I/godot (16992): ANDROID MODULES: Nothing to load, aborting

Maybe some properties should be initialized or some method should be call and I haven't figured it out so far.Hoping for help==.

@akien-mga
Copy link
Member

This is out of the scope of this issue tracker as it's not something that should be implemented in Godot itself. Exported Godot games are apps that can be run normally - whether a native iOS or Android app can trigger launching another app is not really related to Godot (and it's likely possible, but better to ask on iOS or Android forums).

@kazman1
Copy link

kazman1 commented Feb 11, 2020

Is it easy to convert gdscript to react native?

@Calinou
Copy link
Member

Calinou commented Feb 11, 2020

@kazman1 GDScript and React Native are entirely unrelated to each other. There's no way to "convert" from one to another.

Also, please ask support questions on one of the other community channels, not here 🙂

@First-AI
Copy link

First-AI commented Dec 3, 2020

I'm also looking for the same thing.

@Calinou
Copy link
Member

Calinou commented Dec 3, 2020

@First-AI Android subview embedding will be supported in 3.2.4 (and is in 3.2.4beta3 already), see godotengine/godot-proposals#1064.

iOS subview embedding isn't implemented yet, see godotengine/godot-proposals#1473.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants