is it possible to run simple python games on android os - android

I started learning programming recently using python and have always had a keen interest in the android os and hope to do more with it when I get more experienced.
I have SL4A and python installed on my tablet. I have spent a lot of time trying to figure out how run simple games written in python on my tablet.
For instance, I made a simple hangman game as an assignment: is it possible to run that on my tablet, and if so what do I need to do?
I have seen a lot of python and android related stuff online but I find it hard to get a simple example about how exactly to use python with android. Furthermore, what exactly are the limitations/best uses for python in relation to android devices? Any help or pointers in the right direction would be appreciated. Thanks.

I know of Kivi (http://kivy.org/). Going this route may help you.

Related

How can I execute a game made with pygame on an android device?

I wrote a simple game for my son using pygame. He would like to play it on an android tablet.
Does anyone one know how to achieve this? Maybe a good tutorial or tool to make an android app out of a pygame game? Or even through an emulator or packaging?
I have seen some answers to similar questions but they are years old citing e.g. pgs4a , I wonder if there has been any development.
It is possible to run a program made with PyGame on android, but it may be difficult to do. Try using kivy instead. Kivy works relatively similar to PyGame, which is why I recommend it.
There is an app called 'pydroid' on playstore that might help you
It is an python interpreter for android that supports pygame as well
https://play.google.com/store/apps/details?id=ru.iiec.pydroid3

How to open my Android native application with Xamarin.forms?

I've been developing an Android application with Android Studio and now I need to be able to open it with Xamarin.forms in Visual Studio (it's a task that my teacher gave me, and it's because a classmate has been creating the iOS version and now we will combine them into one project).
I have to say that I'm pretty much a noob and been looking a few tutorials that talk about Dependency Service and other stuff, but don't seem to quite cover what I'm looking for (or, at least, not clearly enough).
If you have a precise video that explains simply how to do this, I would be grateful if you share it with me.
I thank you for your time and wish you a great day :)
It is impossible at even now in current version of Visual Srudio .
Every file in Xamain is different with Native Android . The Java code can not be directly copyed to use in Xamarin , you should translate them to C#.
Having a look at this document: Porting Java to C# for Xamarin.Android .
There are two ways to port Java code to C#. The first way is to port the code manually. ..The second porting methodology is to try and automate the process by using a code converter...There is often a non-trivial amount of work involved with bootstrapping an automated code conversion tool, and this may prove to be a barrier to use. In many cases, it may be simpler and easier to port Java to C# by hand.

kivy or something else for android UI

I am learning to program (python 3.x) and was wondering what would be best to learn for making android apps/games. I dont know anything about UI really but have heard that kivy? Is on android. Is that worth learning or should i use something else.
Thanks
Edit:
I am using sl4a and py34a on my android device.
Kivy is good, and will run on Android, but you can't make Android apps with it. It has no way of interacting with the Android API. You can run a kivy app on the device, but can not read sensors or anything like that. They have a project called pyjnius, which allows you to access Java classes from Python, but not with Python3, and it's not very easy to use unless you know Java.
You have SL4A installed, so you can use web technology to do UIs, including games, which can be rendered on the device using webviews. That said, Kivy is a much more mature and well maintained project.
I'm loving kivy. The irony is, that I found this topic here looking for help with python 3. Python 2 works perfectly, but 3 is still being made compatible. Other than that Kivy is great for beginner coders. Especially, because you don't have to code the complex stuff.

Python for IOS or Android

I have been looking at the different packages for python on android and IOS as i am going to be upgrading my phone soon.
However, i dont know which OS to go with. For android they have the SL4A package, but for IOS they have their equivilent. However, im stuck on which to go for. Does anyone have any suggestions for this?
I know its kind of a stupid question, however im just getting into mobile development since they allowed scripting languages on the mobile platform.
The python support for Android is pretty good, but still under development. You can do things that a scripting language can but not the stuff that Python as a OO language can.
Example:- When you go through the api reference here, you can see that one can write scripts to do basic to complex tasks, but, in a restrictive way. You can never build full blown apps, and even if you do, it will always be slow because the SLA4 is just another layer on top of few other layers in the Android hierarchy. There have been a lot of fun stuff that has been done using Python scripting, example: http://www.wired.com/gadgetlab/2010/07/nexus-one-phone-rides-a-rocket-up-28000-feet/#ixzz0v7LFT7ay (A bit over-board and crazy, but awesome nonetheless.)
I don't have much experience on an IPhone to pass on such comments. But, an IPhone is expensive. You can always get a used Nexus phone and do all kinds of Python hacking/scripting. All depends on your budget and your need.
That is all.
I had been on the lookut for Python on iOS for sometime. About 2-months ago, one one released to the iTunes app store -- http://pythonforios.com/ and it is fantastic! It includes the complete set of Python 2.7.2 documentation -- which alone is worth the $3 price.
It's a bit of a challenge to code any serious apps (which I suspect is the result of the developer having to comply w/ Apple's app guidelines), but it is a perfect place to test ideas from a train or airport (when you are without a laptop).
1 caveat -- I've only tried it on an iPad. It could be a bit cramped screen real-estate on an iphone.
Pythonista is an excellent alternative for the iOS platform - here's a nice article on it. And this one details how you can achieve workflow automation on the iPAD.

Hachoir Parser in Android

I need to implement the Hachoir framework in the android phone. I am lost as to where to start and how to go about understanding the framework. Is there anyway to call the python files into my android code or some other documentation which will help me get started ? I appreciate the help !
You asked a general question, so the best I can do is give you a general answer. On android, you can't execute python as far as I know. The only thing that comes close is Android Scripting Environment.

Categories

Resources