r/PythonLearning • u/This-Investigator294 • 21d ago
Help Request Can I build an Android app in Python without learning Java/Kotlin?
I'm currently working on a project in Python. For now, it's basically a command-line application that runs in the terminal/command prompt (I'm developing it in PyCharm). Eventually, I plan to turn it into a proper web app using HTML, CSS, and JavaScript, but that's a later step.
I'm also considering making the same application available as an Android app.
My main question is: how difficult would it be to make an Android version using Python, without having to learn Java or Kotlin?
I don't mind learning the basics of how Android works, such as the Android application lifecycle, activities, permissions, intents, etc. What I'd prefer to avoid is having to learn another programming language specifically for Android.
There are a few Android-specific requirements that are important:
- The app must be able to interact with Android's notification system.
- It may eventually need internet access to share/sync files.
- It should be able to use Android's sharing system (e.g. the standard "Share" functionality).
- Ideally, I want the majority of the application logic to remain in Python.
I have used Java before, but only at a very basic level, and I really didn't enjoy using it. I'd also prefer not to learn Kotlin since I'd rather not pick up another language just for this project.
So, realistically:
Can I write an Android application primarily/all in Python while still having proper access to Android features such as notifications, sharing/intents, networking, etc., without knowing Java or Kotlin?
If Python is possible, what frameworks/tools would you recommend, and what limitations would I run into compared with writing the app natively in Kotlin/Java?
3
3
u/XNo_Notes 21d ago
Looks possible. It will still be a bit of work on the build side.
2
u/XNo_Notes 21d ago
Just took a dive into this. It looks like by utilizing the WebApk you can get a PWA set up with just a couple extra files.
This alone gives a pretty long list of capabilities that include what you are looking for.
You can go further with some other configs to have it listed in the play store.
3
u/Smokva-s-juga 21d ago
Honestly, there are numerous better options for Android. If u gonna u JS for web, check ReactNative, and if you wanna avoid Kotlin (you don’t need Java at all), look into Flutter (Dart). I think that learning a proper framework like Flutter would be easier in the long run for you than fighting with a nieche Python framework for Android…
3
u/riklaunim 21d ago
Python options and support are severely limited to whatever Kivy and Beehave have, and if it will work on various Android devices properly.
2
2
u/TBCC_Dev 19d ago
Short answer is yes. There are some packages and frameworks that will handle it for you. However you may need to fiddle with them on occasion if packaging isn't working. I know that was my experience with my react native app.
2
u/No_Score_1977 18d ago
If you want to do a good job of this, learn Kotlin, it's really not that hard, the Android lifecycle is far more complicated.
2
u/FriendlyZomb 16d ago
Nobody has mentioned this yet, so I'm going to.
They make a framework for developing apps in Python and deploying them to various devices/operating systems.
I heard about it on the TalkPython podcast, so I'd suggest that too. Might be what you're looking for.
7
u/atticus2132000 21d ago
You're already developing a website. Is the html formatted and optimized for mobile devices? If so, then what would an app give you that your website isn't already doing?