How to create an android app from a python-flask web app created on the desktop?
I've created a simple app, rather a basic "HelloWorld" app, just for sake testing the web app and for converting it into an Android app. This is the following code:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello World'
if __name__=='__main__':
app.run()
android python-3.x flask
add a comment |
I've created a simple app, rather a basic "HelloWorld" app, just for sake testing the web app and for converting it into an Android app. This is the following code:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello World'
if __name__=='__main__':
app.run()
android python-3.x flask
You can use flask as the application backend. Flask doesn't have anything with python mobile app development.
– metmirr
Nov 10 at 9:10
Thanks for the info. Really new to Web app dev, need to learn all the basic factors.
– Kerm Lloyd
Nov 10 at 13:16
add a comment |
I've created a simple app, rather a basic "HelloWorld" app, just for sake testing the web app and for converting it into an Android app. This is the following code:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello World'
if __name__=='__main__':
app.run()
android python-3.x flask
I've created a simple app, rather a basic "HelloWorld" app, just for sake testing the web app and for converting it into an Android app. This is the following code:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello World'
if __name__=='__main__':
app.run()
android python-3.x flask
android python-3.x flask
asked Nov 10 at 6:04
Kerm Lloyd
62
62
You can use flask as the application backend. Flask doesn't have anything with python mobile app development.
– metmirr
Nov 10 at 9:10
Thanks for the info. Really new to Web app dev, need to learn all the basic factors.
– Kerm Lloyd
Nov 10 at 13:16
add a comment |
You can use flask as the application backend. Flask doesn't have anything with python mobile app development.
– metmirr
Nov 10 at 9:10
Thanks for the info. Really new to Web app dev, need to learn all the basic factors.
– Kerm Lloyd
Nov 10 at 13:16
You can use flask as the application backend. Flask doesn't have anything with python mobile app development.
– metmirr
Nov 10 at 9:10
You can use flask as the application backend. Flask doesn't have anything with python mobile app development.
– metmirr
Nov 10 at 9:10
Thanks for the info. Really new to Web app dev, need to learn all the basic factors.
– Kerm Lloyd
Nov 10 at 13:16
Thanks for the info. Really new to Web app dev, need to learn all the basic factors.
– Kerm Lloyd
Nov 10 at 13:16
add a comment |
2 Answers
2
active
oldest
votes
You can use Kivy. From main page you can read:
Kivy - Open source Python library for rapid development of applications
that make use of innovative user interfaces, such as multi-touch apps.
Kivy runs on Linux, Windows, OS X, Android, iOS, and Raspberry Pi. You can run the same code on all supported platforms.
Afteer learning kivy a little bit, see this answer
Thanks for the answer. Will the app run with the same settings as done on flask like: "set FLASK_APP=MyApp" and then "flask run" and on the URL "127.0.0.1:5000/" ?
– Kerm Lloyd
Nov 10 at 13:11
Will Tk help in this situation?
– Kerm Lloyd
Nov 10 at 13:15
I'm getting such output on the terminal, and the app works on "127.0.0.1:5000/" gyazo.com/a5dc31a4dd6df107e179a48c279b39bd
– Kerm Lloyd
Nov 10 at 13:34
Sorry, but I just heard about kivy. I didn't use it before, but in your case, if you want to build Android app, you can always make a web view app, to just 'grab', so to speak, web page and serve it on android. Something like iframe tag does in HTML. But you can learn more about Kivy, since it can export your application written in python, to other platforms, among them android of course.
– Dinko Pehar
Nov 10 at 16:34
add a comment |
The quickstart for the specific kivy project to use can be found at:
https://python-for-android.readthedocs.io/en/latest/quickstart/
Look at "Build a WebView application"
p4a apk --private $HOME/code/myapp --package=org.example.myapp --name "My WebView Application" --version 0.1 --bootstrap=webview --requirements=flask --port=5000
Thanks for the answer. Will surely see to it.
– Kerm Lloyd
Nov 10 at 13:18
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53236431%2fhow-to-create-an-android-app-from-a-python-flask-web-app-created-on-the-desktop%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use Kivy. From main page you can read:
Kivy - Open source Python library for rapid development of applications
that make use of innovative user interfaces, such as multi-touch apps.
Kivy runs on Linux, Windows, OS X, Android, iOS, and Raspberry Pi. You can run the same code on all supported platforms.
Afteer learning kivy a little bit, see this answer
Thanks for the answer. Will the app run with the same settings as done on flask like: "set FLASK_APP=MyApp" and then "flask run" and on the URL "127.0.0.1:5000/" ?
– Kerm Lloyd
Nov 10 at 13:11
Will Tk help in this situation?
– Kerm Lloyd
Nov 10 at 13:15
I'm getting such output on the terminal, and the app works on "127.0.0.1:5000/" gyazo.com/a5dc31a4dd6df107e179a48c279b39bd
– Kerm Lloyd
Nov 10 at 13:34
Sorry, but I just heard about kivy. I didn't use it before, but in your case, if you want to build Android app, you can always make a web view app, to just 'grab', so to speak, web page and serve it on android. Something like iframe tag does in HTML. But you can learn more about Kivy, since it can export your application written in python, to other platforms, among them android of course.
– Dinko Pehar
Nov 10 at 16:34
add a comment |
You can use Kivy. From main page you can read:
Kivy - Open source Python library for rapid development of applications
that make use of innovative user interfaces, such as multi-touch apps.
Kivy runs on Linux, Windows, OS X, Android, iOS, and Raspberry Pi. You can run the same code on all supported platforms.
Afteer learning kivy a little bit, see this answer
Thanks for the answer. Will the app run with the same settings as done on flask like: "set FLASK_APP=MyApp" and then "flask run" and on the URL "127.0.0.1:5000/" ?
– Kerm Lloyd
Nov 10 at 13:11
Will Tk help in this situation?
– Kerm Lloyd
Nov 10 at 13:15
I'm getting such output on the terminal, and the app works on "127.0.0.1:5000/" gyazo.com/a5dc31a4dd6df107e179a48c279b39bd
– Kerm Lloyd
Nov 10 at 13:34
Sorry, but I just heard about kivy. I didn't use it before, but in your case, if you want to build Android app, you can always make a web view app, to just 'grab', so to speak, web page and serve it on android. Something like iframe tag does in HTML. But you can learn more about Kivy, since it can export your application written in python, to other platforms, among them android of course.
– Dinko Pehar
Nov 10 at 16:34
add a comment |
You can use Kivy. From main page you can read:
Kivy - Open source Python library for rapid development of applications
that make use of innovative user interfaces, such as multi-touch apps.
Kivy runs on Linux, Windows, OS X, Android, iOS, and Raspberry Pi. You can run the same code on all supported platforms.
Afteer learning kivy a little bit, see this answer
You can use Kivy. From main page you can read:
Kivy - Open source Python library for rapid development of applications
that make use of innovative user interfaces, such as multi-touch apps.
Kivy runs on Linux, Windows, OS X, Android, iOS, and Raspberry Pi. You can run the same code on all supported platforms.
Afteer learning kivy a little bit, see this answer
answered Nov 10 at 8:33
Dinko Pehar
1,0372324
1,0372324
Thanks for the answer. Will the app run with the same settings as done on flask like: "set FLASK_APP=MyApp" and then "flask run" and on the URL "127.0.0.1:5000/" ?
– Kerm Lloyd
Nov 10 at 13:11
Will Tk help in this situation?
– Kerm Lloyd
Nov 10 at 13:15
I'm getting such output on the terminal, and the app works on "127.0.0.1:5000/" gyazo.com/a5dc31a4dd6df107e179a48c279b39bd
– Kerm Lloyd
Nov 10 at 13:34
Sorry, but I just heard about kivy. I didn't use it before, but in your case, if you want to build Android app, you can always make a web view app, to just 'grab', so to speak, web page and serve it on android. Something like iframe tag does in HTML. But you can learn more about Kivy, since it can export your application written in python, to other platforms, among them android of course.
– Dinko Pehar
Nov 10 at 16:34
add a comment |
Thanks for the answer. Will the app run with the same settings as done on flask like: "set FLASK_APP=MyApp" and then "flask run" and on the URL "127.0.0.1:5000/" ?
– Kerm Lloyd
Nov 10 at 13:11
Will Tk help in this situation?
– Kerm Lloyd
Nov 10 at 13:15
I'm getting such output on the terminal, and the app works on "127.0.0.1:5000/" gyazo.com/a5dc31a4dd6df107e179a48c279b39bd
– Kerm Lloyd
Nov 10 at 13:34
Sorry, but I just heard about kivy. I didn't use it before, but in your case, if you want to build Android app, you can always make a web view app, to just 'grab', so to speak, web page and serve it on android. Something like iframe tag does in HTML. But you can learn more about Kivy, since it can export your application written in python, to other platforms, among them android of course.
– Dinko Pehar
Nov 10 at 16:34
Thanks for the answer. Will the app run with the same settings as done on flask like: "set FLASK_APP=MyApp" and then "flask run" and on the URL "127.0.0.1:5000/" ?
– Kerm Lloyd
Nov 10 at 13:11
Thanks for the answer. Will the app run with the same settings as done on flask like: "set FLASK_APP=MyApp" and then "flask run" and on the URL "127.0.0.1:5000/" ?
– Kerm Lloyd
Nov 10 at 13:11
Will Tk help in this situation?
– Kerm Lloyd
Nov 10 at 13:15
Will Tk help in this situation?
– Kerm Lloyd
Nov 10 at 13:15
I'm getting such output on the terminal, and the app works on "127.0.0.1:5000/" gyazo.com/a5dc31a4dd6df107e179a48c279b39bd
– Kerm Lloyd
Nov 10 at 13:34
I'm getting such output on the terminal, and the app works on "127.0.0.1:5000/" gyazo.com/a5dc31a4dd6df107e179a48c279b39bd
– Kerm Lloyd
Nov 10 at 13:34
Sorry, but I just heard about kivy. I didn't use it before, but in your case, if you want to build Android app, you can always make a web view app, to just 'grab', so to speak, web page and serve it on android. Something like iframe tag does in HTML. But you can learn more about Kivy, since it can export your application written in python, to other platforms, among them android of course.
– Dinko Pehar
Nov 10 at 16:34
Sorry, but I just heard about kivy. I didn't use it before, but in your case, if you want to build Android app, you can always make a web view app, to just 'grab', so to speak, web page and serve it on android. Something like iframe tag does in HTML. But you can learn more about Kivy, since it can export your application written in python, to other platforms, among them android of course.
– Dinko Pehar
Nov 10 at 16:34
add a comment |
The quickstart for the specific kivy project to use can be found at:
https://python-for-android.readthedocs.io/en/latest/quickstart/
Look at "Build a WebView application"
p4a apk --private $HOME/code/myapp --package=org.example.myapp --name "My WebView Application" --version 0.1 --bootstrap=webview --requirements=flask --port=5000
Thanks for the answer. Will surely see to it.
– Kerm Lloyd
Nov 10 at 13:18
add a comment |
The quickstart for the specific kivy project to use can be found at:
https://python-for-android.readthedocs.io/en/latest/quickstart/
Look at "Build a WebView application"
p4a apk --private $HOME/code/myapp --package=org.example.myapp --name "My WebView Application" --version 0.1 --bootstrap=webview --requirements=flask --port=5000
Thanks for the answer. Will surely see to it.
– Kerm Lloyd
Nov 10 at 13:18
add a comment |
The quickstart for the specific kivy project to use can be found at:
https://python-for-android.readthedocs.io/en/latest/quickstart/
Look at "Build a WebView application"
p4a apk --private $HOME/code/myapp --package=org.example.myapp --name "My WebView Application" --version 0.1 --bootstrap=webview --requirements=flask --port=5000
The quickstart for the specific kivy project to use can be found at:
https://python-for-android.readthedocs.io/en/latest/quickstart/
Look at "Build a WebView application"
p4a apk --private $HOME/code/myapp --package=org.example.myapp --name "My WebView Application" --version 0.1 --bootstrap=webview --requirements=flask --port=5000
answered Nov 10 at 12:16
Hewho Seekanswers
13
13
Thanks for the answer. Will surely see to it.
– Kerm Lloyd
Nov 10 at 13:18
add a comment |
Thanks for the answer. Will surely see to it.
– Kerm Lloyd
Nov 10 at 13:18
Thanks for the answer. Will surely see to it.
– Kerm Lloyd
Nov 10 at 13:18
Thanks for the answer. Will surely see to it.
– Kerm Lloyd
Nov 10 at 13:18
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53236431%2fhow-to-create-an-android-app-from-a-python-flask-web-app-created-on-the-desktop%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You can use flask as the application backend. Flask doesn't have anything with python mobile app development.
– metmirr
Nov 10 at 9:10
Thanks for the info. Really new to Web app dev, need to learn all the basic factors.
– Kerm Lloyd
Nov 10 at 13:16