- Home /
How do I get my game on a Android device? (Galaxy S2)
Hi,
sorry if that has been asked before, I tried the search but nothing really useful showed up. So I am working with Unity for a couple of months now, trying to create a small 3d game for mobile devices. I usually develop for ipad and know the process of how to compile my game to the ipad. Now my colleague brought his Galaxy S2 and we want to compile the game to his android device. I have no experience with android app development whatsoever.
Can anyone please descrone the process of how to get a unity app to galaxy s2. What tools do I need? Are there any good tutorials out there on how to do it? what should i look out for?..
thanks in advance frankblizzard
Answer by CHPedersen · Apr 23, 2012 at 10:49 AM
Go to Google Play on the Android device and download the app called "Astro File Manager / Browser". It is what it says it is: A File browser for your phone. But the cool thing about it is that it can launch the installation procedure for APK files whose origin is somewhere else than Google Play.
Now use Unity to build the application. It will result in an APK-file. This is the installation file for Android. Use a USB cable to connect the device to your computer, then simply copy-paste the APK file onto the device, wherever you want it.
Now, open Astro, and browse to the APK-file's location. Tap it. Astro launches the installer for your app. Install the app, and you're good to go. :)
EDIT:
I forgot to mention that you must go to Settings->Application Settings and in there, tick the setting that reads "Unknown Sources". This allows the system to install non-market apps. This is what iPhone owners must jailbreak their device to accomplish. In Android, it's a simple setting. :)
hey thanks man.. nice skeletor avatar btw :) will try this and get back how it went..
No problem, it should be pretty straight forward. Let me know if you encounter any snags. Heh, I know it's a little silly, but I love that damn avatar. :-D
hi christian. thanks your approach works fine. one thing we recognized though is that the back button on galaxy s2 is not ter$$anonymous$$ating the unity app, as opposed to other android apps. how do you go about quitting your app, do we need a custom line of code in order to ter$$anonymous$$tate it? thx
I Would just press the home button, i've had that with my games too :S
Hi frankblizzard:
I wasn't aware of that, sorry. :) I have a button in the UI of the app which calls Application.Quit() upon being pressed.
According to this question: http://answers.unity3d.com/questions/25535/android-back-button-event.html
It seems the back button on Android maps to the "$$anonymous$$eyCode.Escape" in Unity. So you can test for that, and call Application.Quit() there as well. That should solve it for you.
Answer by crtaylor · Jan 22, 2014 at 05:02 AM
Make sure you have Developer Options turned on on your phone
Make sure you have Build Settings configured correctly in Unity (ie Android platform)
Hit Build and Run
OK the saving of the apk on your PC
Let it continue and you will find that it will start running on your phone :)
Just make sure your phone is unlocked (with finger print or passcode)
Your answer
Follow this Question
Related Questions
Bad performance on Galaxy Tab 4 1 Answer
PlayerPrefs not saving on Android Phone 1 Answer
How to add rim light for mobile in my shader? 0 Answers
Detect Device Orientation Event 1 Answer