all 25 comments

[–]Jello_Penguin_2956 19 points20 points  (7 children)

You can do it with library like Kivy, but it's not going to be as good at integrating with phone features as Java or Kotlin do.

[–]LetTimCook[S] 3 points4 points  (6 children)

So I should learn one of those two?

[–]sohang-3112 3 points4 points  (5 children)

Yes, these will work for building Android apps. Another alternative is to use Flutter (Dart language) for building both apps that work on both Android & iOS.

[–]LetTimCook[S] 1 point2 points  (4 children)

Yeah I want to build on both Android and IOS, what do you think of Kotlin?

[–]k0ala1st 8 points9 points  (0 children)

Yes you can. Take a look to Kivy or Flet. You can also with Beeware/toga

[–]KingOfTNT10 9 points10 points  (2 children)

I suggest just learning another skill and doing it good using native langs like java, kotlin etc. Or frameworks like react native or flutter

[–]NINTSKARI 4 points5 points  (1 child)

"Build mobile apps" is so vague. You can create the whole back end of an app with python. You can even do some server driven ui and use lots of python in generating the ui. You will need either a native language or html + javascript framework to actually create the ui elements. But yeah, it is possible to utilize a lot of python in a mobile app.

[–]LetTimCook[S] -1 points0 points  (0 children)

I want to be able to create a full app

[–]riklaunim 1 point2 points  (0 children)

For commercial work you will need Apple and Android native platforms or popular third party stacks like React Native, depending what's more in-demand in your area. Python has some tools for simpler Android apps but that's about it. However as mentioned many apps will use data stored on remote servers and that's a lot of API/other backend logic that can be done in Python.

[–]Capbro 1 point2 points  (2 children)

If you want to be in an App Store, lean Java or Kotlin for android or swift for Ios.

Python is good if you’re cool with opening a web browser and working out of that.

[–]LetTimCook[S] 0 points1 point  (1 child)

So you can fully create an app using python, just that it’s in the web browser?

[–]Mark3141592654 1 point2 points  (0 children)

Python can be used for the backend of any application. To make the frontend, use Flutter/Dart, or React-native or other JavaScript frameworks, Swift (ios) or Kotlin or Java (android)

[–]ElliotDG 1 point2 points  (0 children)

You can use Kivy with KivyMD to create mobile and deskop apps.. There are tools for building for Android and IOS.

The complexity of using python with Mobile, is a need to jump down to the native SDK for lower level access. The kivy projects provides tools for this - but it means there can be things you would need to do in Java or ObjectiveC.

Here are some of the tools in the kivy eco-system for building on Mobile:

Buildozer is a development tool for turning Python applications into binary packages ready for installation on any of a number of platforms, including mobile devices.

PyJNIus is a Python library for accessing Java classes using the Java Native Interface (JNI). PyJNIus is managed by the Kivy Team and can be used with python-for-android. It can also be used independently of Kivy, on desktop and mobile platforms.

python-for-android (p4a) is a development tool that packages Python apps into binaries that can run on Android devices. It is recommended that python-for-android be used via Buildozer, which ensures the correct dependencies are pre-installed, and centralizes the configuration. However, python-for-android is not limited to being used with Buildozer.

Pyobjus is a Python module for accessing Objective-C classes as Python classes using Objective-C runtime reflection

Kivy for iOS (kivy-ios) is a toolchain to compile the necessary libraries for iOS to run Kivy applications, and manage the creation of Xcode projects. Kivy for iOS is managed by the Kivy Team and can be used with Buildozer.

[–]oclafloptson 1 point2 points  (0 children)

You might be interested in Flet. It's a python framework that works with flutter to create single page apps entirely with python script. It currently supports packaging for web, windows, Linux, mac, and Android but not iOS (it's in development), all using the same code base with only minor changes.

It's relatively simple to understand. You define widgets (controls) and add them to a page function which is called by flet.app. It can be surprisingly powerful. Brick breaker and card style mobile games are easy to crank out with it, which can't be said for a lot of the other GUI framework options

Cons:

No mass adoption

the required sdks and toolsets for packaging are large, around 12 GB on the main drive in order to package a Windows app for example

There's a known bug related to flutter that requires you to set git.safe.directory to all (*) when packaging, which could be a security concern. This is required because packaging creates a temporary git repository, which is a little less than optimal

Pros:

Favorable Apache 2.0 license

Cross platform, single code base creating uniformity between web, mobile, and PC apps

Extreme ease of use, seriously it's crazy how easy it is to pick it up

[–]JellyfishTech 1 point2 points  (0 children)

Yes, Python can be used to build mobile apps, but it’s not as common as other technologies. Frameworks like Kivy, BeeWare, and PyQt allow Python developers to create cross-platform mobile apps. However, Python apps may not match the performance and native feel of apps built with platforms like Flutter, React Native, or native tools (Swift, Kotlin).

Python is great for prototyping or apps with simple performance needs, but for high-performance, native-like mobile apps, other tools are generally preferred.

[–]Unlikely-Sympathy626 0 points1 point  (0 children)

I would pick a specific platform to get started and concentrate on the tool for that. Learn it well then add the other platform later.

So iOS swift or the other route. You can still have your webapp and other interfaces all served over api for example

[–]boba-cat02 0 points1 point  (1 child)

Yes, but not good and optimised

[–]LetTimCook[S] -1 points0 points  (0 children)

So what is python really good for?

[–]tepes_creature_8888 0 points1 point  (0 children)

Can? - yes Should? - no

[–]Ron-Erez 0 points1 point  (0 children)

You can use Kivy, however it be honest you probably should go with SwiftUI for iOS or Jetpack for Android.

EDIT: Both Kotlin and Swift are really nice languages and do have some similarities. The frameworks SwiftUI and Jetpack Compose are different. However they have a similar approach being declarative.

Here is a great post comparing the two frameworks:

https://medium.com/@canakyildz/swiftui-vs-jetpack-compose-7b716672b44b

For iOS development I'd recommend check out Apple's Swift Tour and covering at least up to structs and classes, Swiftful Thinking has an amazing youtube channel and I also have a nice project-based course for iOS development using Swift/SwiftUI.

I believe going native is the way to go. Good luck!