git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

convert .py to Android ?


"Steve" <Gronicus at SGA.Ninja> writes:

> I have a working .py program

(Do you mean a Python program? Or something different?)

> that I want to get into my Android Moto G phone.

To my knowledge, an Android app must be implemented, at some level, in
Java and specifically linked to Android Java libraries. That's a hard
limitation of the Android platform.

That implies that any Python program will need to be written at least
with partial awareness that it is not going to run in a native Python
VM, but instead get compiled to somehow run in a Java Android environment.

> A bit more than a year ago, I went through the Kivy set up and
> actually had the Good Morning World program in my phone but at that
> time I did not seem to be able to do it again.

Yes, Kivy is one way to have a Python program that gets converted to an
Android native app.

> Is there an easier way to achieve my task?

Easier than Kivy? Probably not.

You might want to investigate the BeeWare suite as an alternative
<URL:https://pybee.org/>. Bonus: a single Python program can be compiled
to an app for multiple different platforms.

-- 
 \      ?Compulsory unification of opinion achieves only the unanimity |
  `\        of the graveyard.? ?Justice Roberts in 319 U.S. 624 (1943) |
_o__)                                                                  |
Ben Finney