How to create an android app from a python-flask web app created on the desktop?









up vote
1
down vote

favorite












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()









share|improve this question





















  • 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














up vote
1
down vote

favorite












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()









share|improve this question





















  • 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












up vote
1
down vote

favorite









up vote
1
down vote

favorite











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()









share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 6:04









Kerm Lloyd

122




122











  • 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










  • 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












2 Answers
2






active

oldest

votes

















up vote
0
down vote













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






share|improve 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


















up vote
0
down vote













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






share|improve this answer




















  • Thanks for the answer. Will surely see to it.
    – Kerm Lloyd
    Nov 10 at 13:18










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',
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
);



);













draft saved

draft discarded


















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








up vote
0
down vote













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






share|improve 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















up vote
0
down vote













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






share|improve 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













up vote
0
down vote










up vote
0
down vote









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






share|improve 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







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 10 at 8:33









Dinko Pehar

613324




613324











  • 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











  • 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













up vote
0
down vote













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






share|improve this answer




















  • Thanks for the answer. Will surely see to it.
    – Kerm Lloyd
    Nov 10 at 13:18














up vote
0
down vote













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






share|improve this answer




















  • Thanks for the answer. Will surely see to it.
    – Kerm Lloyd
    Nov 10 at 13:18












up vote
0
down vote










up vote
0
down vote









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






share|improve this answer












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







share|improve this answer












share|improve this answer



share|improve this answer










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
















  • 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

















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Use pre created SQLite database for Android project in kotlin

Darth Vader #20

Ondo