Giter Club home page Giter Club logo

bhaskartrivedi / flaskwebserverandandroidclient Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.95 MB

One of the favorite languages for machine learning is python, with the growing popularity of mobile app and machine learning, it is very important to establish a connection between mobile app and python development. Considering this in mind, I am presenting a hello world type of environment for web server in a flask and mobile app in Android.

Python 8.77% Java 91.23%

flaskwebserverandandroidclient's Introduction

I have created my environment on windows 10, I hope step will almost remain same for mac and Linux machine.
Install anaconda if you do not have it.
Open anaconda command prompt in admin mode
Create virtual env
conda create -n Datamining python 3.6
Activate your anaconda virtual env
Activate Datamining
Install flask
pip install flask
install android studio
If you haven’t created any project in android, please follow hello world for android
https://google-developer-training.gitbooks.io/android-developer-fundamentals-course-practicals/content/en/Unit%201/11_p_hello_world.html
Write Server Code using flask and saved it as DataMiningServer.py or use mine to understand concept
execute python DataMiningServer.py
it will start your basic server, for me generated URL was http://127.0.0.1:5000/

create some basic android project you can fork my project also.
If you are using my project use user name as Bhaskar and password as imbhaskar at login screen.
Click on login button, it will send and received JSON object to and from flask web server

Android side API ReadReceivedJson : parse received JSON Object from server
CreateDatatoSend : Create JSON data to send to server
getResponseFromServer : Will create URL connection and request POST message from server
AsyncTask : will start Asynchronous connection request with server
doInBackground : Will run the thread in background
onPostExecute : Execute after it receive response from server

I have printed received JSON object at log an android editor

flaskwebserverandandroidclient's People

Contributors

bhaskartrivedi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.