You can use kivy to develop Android apps with really nice and innovative widgets using Python
Kivy is OpenSource
The easiest way to run Kivy is through the an app called Kivy Launcher found at
https://play.google.com/store/apps/details?id=org.kivy.pygame
on the Play .
What you need to do on your phone ?
Go to storage/emulated/0/
(sometimes named as sdcard)
You have to
1 create a folder named kivy in the above location
2 create a folder having the same name as your project in the kivy folder above
The two files needed
In the folder having the same name as your app name, create two files
1 android.txt
2 main.py
android.txt
In android.txt write
title = myPyApp
author = AR
orientation = portrait
just replace the title and author with your own !
In main.py write
from kivy.app import App
from kivy.uix.button import Button
class TestApp(App):
def build(self):
return Button(text=’Hello world, from a nice blog’)
TestApp().run()
Now go to the kivy launcher you should see :
.
.
choose your project :
.
.
You see :
.
.
If you click it, it will become Blue as it’s a button
.
.
Problems creating files etc ?
Download :
https://play.google.com/store/apps/details?id=com.estrongs.android.pop
Es explorer, a file nice explorer
Kivy launcher really crappy instruction
Well, i had to glue together pieces of information to get the laucher running,
Kivy recommends the launcher, but it seems that they thought you made the app…
user comments are always valuable . . .
Word of caution
The launcher should only be used for quick testing, not for production !
That’s a shame, I could of made SeaSurf for Android a lot more enhanced, if kivy launcher was for production. 😎😎
LikeLiked by 2 people
haha guess you have to use normal way kivy
LikeLiked by 2 people
With you as part of the community, SeaSurf for android made in studio will be awesome
LikeLiked by 2 people
👍
LikeLiked by 2 people
Thumps
LikeLiked by 2 people
The app crashes as soon as I click on the proj plz help i am on tesco hudl2 android 5.1
LikeLiked by 2 people
you Followed the example above?
LikeLiked by 2 people
Yup!
LikeLiked by 2 people
you went until you created the project ?
LikeLiked by 1 person
that means you created the kivy folder where necessary?
LikeLiked by 1 person
Who is the new author nahaseannjenga?
LikeLiked by 1 person
the creator of classmite.com a php dev
LikeLiked by 1 person
Cool 😎😎
LikeLike
Can you show us more posts about kivy I realised I had done landscape not portrait.
LikeLiked by 1 person
Landscape now works I did the whole thing from Ubuntu then moved it to my tablet. 😎😎
LikeLiked by 1 person
code language=”python”]
import kivy
from kivy.app import App
from kivy.lang import Builder
from kivy.utils import platform
from kivy.uix.widget import Widget
from kivy.clock import Clock
from jnius import autoclass
from android.runnable import run_on_ui_thread
from kivy.uix.textinput import TextInput
TextInput = TextInput(text=”)
WebView = autoclass(‘android.webkit.WebView’)
WebViewClient = autoclass(‘android.webkit.WebViewClient’)
activity = autoclass(‘org.renpy.android.PythonActivity’).mActivity
class Wv(Widget):
def __init__(self, **kwargs):
super(Wv, self).__init__(**kwargs)
Clock.schedule_once(self.create_webview, 0)
@run_on_ui_thread
def create_webview(self, *args):
webview = WebView(activity)
webview.getSettings().setJavaScriptEnabled(True)
wvc = WebViewClient();
webview.setWebViewClient(wvc);
activity.setContentView(webview)
webview.loadUrl(‘http://coolchasgamer.wordpress.com’)
def create_textedit(self, *args):
textedit = TextEdit(activity)
class ServiceApp(App):
def build(self):
return Wv()
if __name__ == ‘__main__’:
ServiceApp().run()
[/code]
This allows you to display web pages with kivy.
LikeLiked by 1 person
ha, a kivy ecg surfer
LikeLiked by 1 person
I am sure you could add more features such as an address bar and forward/back.
LikeLiked by 1 person
kivy . . . it needs open gl on pc . . .
LikeLiked by 1 person
Isn’t kivy designed for android. Cool if a game could be made though.
LikeLiked by 1 person
no you can make desktop apps also
LikeLiked by 1 person
Awesome! How do I create them? ❔❔
LikeLiked by 1 person
i just followed a guide on the internet somewhere.
my problem was that i needed to upgrade open gl which happens to upgrade at the same time as hardware.
a loss for python!
LikeLiked by 1 person
Where is the guide?
LikeLiked by 1 person
wait i look for it . . .
LikeLiked by 1 person
Ok 😎😎
LikeLiked by 1 person
http://inclem.net/2014/01/09/kivy-crash-course/1_making-a-simple-app/
LikeLiked by 1 person
nope that’s not the tutorial
LikeLike
How do I develop on iOS?
LikeLiked by 1 person
it is cross platform the desktop apps i think
LikeLiked by 1 person
How do I run them on iOS?
LikeLiked by 1 person
oh ios i think not possible
LikeLiked by 1 person
I am sorry, but I kinda don’t accept “you can’t” answers to my questions. 😎😎
LikeLiked by 1 person
you have to build the app the python way
LikeLiked by 1 person
How do I do that❔
LikeLiked by 1 person
oh just checked it runs on ios
LikeLiked by 1 person
How❔
LikeLiked by 1 person
like https://kivy.org/docs/guide/packaging-ios.html
LikeLiked by 1 person
How do I get Xcode
LikeLike
i’m no ios fan but this describes it :
skip until xcode project
LikeLiked by 1 person
Not Python on Xcode, just Xcode please
LikeLike
ARJ, I remember on the ideas section of my blog, you asked about contacting me. It is now possible! Just go to seasurfblog.wordpress.com/contact. You could also contact me at seasurfblog.wordpress.com/ecg-seasurf-premium-2018 if you want to register for the upcoming SeaSurf 2018. Thank you.
LikeLike
👌👌👌👌👌👌👌
LikeLiked by 1 person
What’s ya mean why not use SeaSurf contact I recommended
LikeLike
ok will use it!
LikeLiked by 1 person
Yippee thanks!
LikeLike
R u done yet? 😎😎
LikeLike
I don’t see any feedback you gave me via contact form.
LikeLike
2 days later… no feedback.
LikeLike
official documentation quite nice
LikeLiked by 1 person
Sorry this won’t work updated.
Here is the code:
LikeLiked by 1 person
i think for android but runs on pc i think
LikeLike
possible on desktop
LikeLike
2morrow will look for it
LikeLike
will use when needed!
LikeLike
see my latest post!
LikeLike
on phone catastrophic for me to use it
LikeLike
i can reply and like but cannot really navigate
LikeLike